Add a couple of lints to the options files

R=devoncarew@google.com

Review-Url: https://codereview.chromium.org/2933713002 .
This commit is contained in:
Brian Wilkerson 2017-06-11 09:12:47 -07:00
parent 4e8203f9cd
commit b928683560
7 changed files with 17 additions and 6 deletions

View file

@ -2,5 +2,7 @@ analyzer:
strong-mode: true
linter:
rules:
- unnecessary_brace_in_string_interp
- empty_constructor_bodies
- empty_statements
- unnecessary_brace_in_string_interp
- valid_regexps

View file

@ -49,6 +49,6 @@ class LibraryDependenciesTest extends AbstractContextTest {
}
void _performAnalysis() {
while (context.performAnalysisTask().hasMoreWork);
while (context.performAnalysisTask().hasMoreWork) {}
}
}

View file

@ -258,7 +258,6 @@ class StatsPage extends PageWriter {
sink.write(method);
sink.writeln('</td></tr>');
}
;
sink.writeln('</table>');
});
}

View file

@ -2,7 +2,7 @@ analyzer:
strong-mode: true
linter:
rules:
# TODO(pq): re-enable once we have a bulk edit tool
# - annotate_overrides
- empty_constructor_bodies
- empty_statements
- unnecessary_brace_in_string_interp
- valid_regexps

View file

@ -44,7 +44,7 @@ SourceSpanWithContext _createSpanHelper(
int lineEnd = endLoc.offset;
int lineNum = lineInfo.getLocation(lineEnd).lineNumber;
while (lineEnd < content.length &&
lineInfo.getLocation(++lineEnd).lineNumber == lineNum);
lineInfo.getLocation(++lineEnd).lineNumber == lineNum) {}
if (end == null) {
end = lineEnd;

View file

@ -2,3 +2,9 @@ analyzer:
strong-mode: true
exclude:
- 'test/data'
linter:
rules:
- empty_constructor_bodies
- empty_statements
- unnecessary_brace_in_string_interp
- valid_regexps

View file

@ -4,4 +4,8 @@ linter:
rules:
- annotate_overrides
- empty_constructor_bodies
- empty_statements
- prefer_single_quotes
- unawaited_futures
- unnecessary_brace_in_string_interp
- valid_regexps