[License] Enable unnecessary_parenthesis lint
This commit is contained in:
@@ -68,6 +68,7 @@ linter:
|
||||
- unnecessary_getters_setters
|
||||
- unnecessary_new
|
||||
- unnecessary_overrides
|
||||
- unnecessary_parenthesis
|
||||
- unnecessary_statements
|
||||
- unnecessary_this
|
||||
- package_names
|
||||
|
||||
@@ -59,7 +59,7 @@ const String kMultiLicenseFileHeader = 'Notices for files contained in';
|
||||
|
||||
bool isMultiLicenseNotice(Reader reader) {
|
||||
final List<int> bytes = reader();
|
||||
return (ascii.decode(bytes.take(kMultiLicenseFileHeader.length).toList(), allowInvalid: true) == kMultiLicenseFileHeader);
|
||||
return ascii.decode(bytes.take(kMultiLicenseFileHeader.length).toList(), allowInvalid: true) == kMultiLicenseFileHeader;
|
||||
}
|
||||
|
||||
FileType identifyFile(String name, Reader reader) {
|
||||
|
||||
@@ -656,9 +656,9 @@ Iterable<_PartialLicenseMatch> _findLicenseBlocks(String body, RegExp pattern, i
|
||||
if (lastWasBlank && (foundNonBlank || !needsCopyright))
|
||||
break;
|
||||
lastWasBlank = true;
|
||||
} else if (((!isBlockCommentLine && line.startsWith('/*')) ||
|
||||
line.startsWith('<!--') ||
|
||||
(range.start == 0 && line.startsWith(' $fullPrefix')))) {
|
||||
} else if ((!isBlockCommentLine && line.startsWith('/*'))
|
||||
|| line.startsWith('<!--')
|
||||
|| (range.start == 0 && line.startsWith(' $fullPrefix'))) {
|
||||
start = range.start;
|
||||
firstLineSpecialComment = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user