[License] Enable unnecessary_parenthesis lint

This commit is contained in:
Chris Bracken
2018-12-20 12:22:15 -08:00
parent bdfdae4abb
commit 153e071ef9
3 changed files with 5 additions and 4 deletions

View File

@@ -68,6 +68,7 @@ linter:
- unnecessary_getters_setters
- unnecessary_new
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_statements
- unnecessary_this
- package_names

View File

@@ -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) {

View File

@@ -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;