Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Unified Diff: pkg/analyzer/lib/src/generated/incremental_resolver.dart

Issue 1131373004: Propogate and handle lint analysis option. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged master. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/incremental_resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
index 789ab424947fe66ef48a6405df0f91bf83cbf040..6dd488c51571f252c14eea7188d7cd99823c4d70 100644
--- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
@@ -999,12 +999,16 @@ class IncrementalResolver {
void _generateLints(AstNode node) {
LoggingTimer timer = logger.startTimer();
try {
- RecordingErrorListener errorListener = new RecordingErrorListener();
- CompilationUnit unit = node.getAncestor((n) => n is CompilationUnit);
- LintGenerator lintGenerator =
- new LintGenerator(<CompilationUnit>[unit], errorListener);
- lintGenerator.generate();
- _lints = errorListener.getErrorsForSource(_source);
+ if (_context.analysisOptions.lint) {
+ RecordingErrorListener errorListener = new RecordingErrorListener();
+ CompilationUnit unit = node.getAncestor((n) => n is CompilationUnit);
+ LintGenerator lintGenerator =
+ new LintGenerator(<CompilationUnit>[unit], errorListener);
+ lintGenerator.generate();
+ _lints = errorListener.getErrorsForSource(_source);
+ } else {
+ _lints = AnalysisError.NO_ERRORS;
+ }
} finally {
timer.stop('generate lints');
}
« no previous file with comments | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698