mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
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:
parent
4e8203f9cd
commit
b928683560
7 changed files with 17 additions and 6 deletions
|
@ -2,5 +2,7 @@ analyzer:
|
||||||
strong-mode: true
|
strong-mode: true
|
||||||
linter:
|
linter:
|
||||||
rules:
|
rules:
|
||||||
- unnecessary_brace_in_string_interp
|
|
||||||
- empty_constructor_bodies
|
- empty_constructor_bodies
|
||||||
|
- empty_statements
|
||||||
|
- unnecessary_brace_in_string_interp
|
||||||
|
- valid_regexps
|
||||||
|
|
|
@ -49,6 +49,6 @@ class LibraryDependenciesTest extends AbstractContextTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
void _performAnalysis() {
|
void _performAnalysis() {
|
||||||
while (context.performAnalysisTask().hasMoreWork);
|
while (context.performAnalysisTask().hasMoreWork) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,7 +258,6 @@ class StatsPage extends PageWriter {
|
||||||
sink.write(method);
|
sink.write(method);
|
||||||
sink.writeln('</td></tr>');
|
sink.writeln('</td></tr>');
|
||||||
}
|
}
|
||||||
;
|
|
||||||
sink.writeln('</table>');
|
sink.writeln('</table>');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ analyzer:
|
||||||
strong-mode: true
|
strong-mode: true
|
||||||
linter:
|
linter:
|
||||||
rules:
|
rules:
|
||||||
# TODO(pq): re-enable once we have a bulk edit tool
|
|
||||||
# - annotate_overrides
|
|
||||||
- empty_constructor_bodies
|
- empty_constructor_bodies
|
||||||
|
- empty_statements
|
||||||
- unnecessary_brace_in_string_interp
|
- unnecessary_brace_in_string_interp
|
||||||
|
- valid_regexps
|
||||||
|
|
|
@ -44,7 +44,7 @@ SourceSpanWithContext _createSpanHelper(
|
||||||
int lineEnd = endLoc.offset;
|
int lineEnd = endLoc.offset;
|
||||||
int lineNum = lineInfo.getLocation(lineEnd).lineNumber;
|
int lineNum = lineInfo.getLocation(lineEnd).lineNumber;
|
||||||
while (lineEnd < content.length &&
|
while (lineEnd < content.length &&
|
||||||
lineInfo.getLocation(++lineEnd).lineNumber == lineNum);
|
lineInfo.getLocation(++lineEnd).lineNumber == lineNum) {}
|
||||||
|
|
||||||
if (end == null) {
|
if (end == null) {
|
||||||
end = lineEnd;
|
end = lineEnd;
|
||||||
|
|
|
@ -2,3 +2,9 @@ analyzer:
|
||||||
strong-mode: true
|
strong-mode: true
|
||||||
exclude:
|
exclude:
|
||||||
- 'test/data'
|
- 'test/data'
|
||||||
|
linter:
|
||||||
|
rules:
|
||||||
|
- empty_constructor_bodies
|
||||||
|
- empty_statements
|
||||||
|
- unnecessary_brace_in_string_interp
|
||||||
|
- valid_regexps
|
||||||
|
|
|
@ -4,4 +4,8 @@ linter:
|
||||||
rules:
|
rules:
|
||||||
- annotate_overrides
|
- annotate_overrides
|
||||||
- empty_constructor_bodies
|
- empty_constructor_bodies
|
||||||
|
- empty_statements
|
||||||
|
- prefer_single_quotes
|
||||||
|
- unawaited_futures
|
||||||
- unnecessary_brace_in_string_interp
|
- unnecessary_brace_in_string_interp
|
||||||
|
- valid_regexps
|
||||||
|
|
Loading…
Reference in a new issue