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

Unified Diff: pkg/analyzer/lib/src/task/dart.dart

Issue 1392683003: Linter hookup into AS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with master. Created 5 years, 2 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/test/analysis_abstract.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index d4294dad7f2900c16a19d27fc9e815f750397913..9da51727a93557b03af5f5f0dcf5835d9dab60c5 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -2572,9 +2572,10 @@ class GenerateLintsTask extends SourceBasedAnalysisTask {
//
// Generate lints.
//
- LintGenerator.LINTERS.forEach((l) => l.reporter = errorReporter);
+ List<Linter> linters = lintRegistry[context] ?? [];
+ linters.forEach((l) => l.reporter = errorReporter);
Iterable<AstVisitor> visitors =
- LintGenerator.LINTERS.map((l) => l.getVisitor()).toList();
+ linters.map((l) => l.getVisitor()).toList();
unit.accept(new DelegatingAstVisitor(visitors.where((v) => v != null)));
//
« no previous file with comments | « pkg/analysis_server/test/analysis_abstract.dart ('k') | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698