[License] Enable always_require_non_null_named_parameters

Adds dependency on package:meta.
This commit is contained in:
Chris Bracken 2018-12-20 12:34:42 -08:00
parent f4b348f779
commit 233c100b69
4 changed files with 10 additions and 3 deletions

View File

@ -1,2 +1,2 @@
Signature: 0461a8d6fe3503cd19d8e0d3becfee87
Signature: acd8a02ea76b205ea2dbea4c91961320

View File

@ -10,6 +10,7 @@ analyzer:
linter:
rules:
- always_require_non_null_named_parameters
- avoid_empty_else
- avoid_function_literals_in_foreach_calls
- comment_references

View File

@ -5,6 +5,8 @@
import 'dart:convert';
import 'dart:io' as system;
import 'package:meta/meta.dart';
import 'cache.dart';
import 'limits.dart';
import 'patterns.dart';
@ -838,7 +840,10 @@ Iterable<_LicenseMatch> _tryReferenceByUrl(String body, MultipleVersionedLicense
}
}
Iterable<_LicenseMatch> _tryInline(String body, RegExp pattern, { bool needsCopyright, String origin }) sync* {
Iterable<_LicenseMatch> _tryInline(String body, RegExp pattern, {
@required bool needsCopyright,
String origin,
}) sync* {
assert(needsCopyright != null);
for (_PartialLicenseMatch match in _findLicenseBlocks(body, pattern, 1, 2, needsCopyright: false)) {
// We search with "needsCopyright: false" but then create a _LicenseMatch with

View File

@ -1,6 +1,7 @@
name: licenses
dependencies:
path: ^1.3.0
archive: ^2.0.4
args: 1.5.0
crypto: ^2.0.2+1
meta: ^1.1.6
path: ^1.3.0