Skip to content

Commit

Permalink
[License] Enable unnecessary_parenthesis lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cbracken committed Dec 20, 2018
1 parent 97ae271 commit 2b207a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions tools/licenses/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ linter:
- unnecessary_getters_setters
- unnecessary_new
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_statements
- unnecessary_this
- package_names
2 changes: 1 addition & 1 deletion tools/licenses/lib/filesystem.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions tools/licenses/lib/licenses.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2b207a5

Please sign in to comment.