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

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

Issue 1174563003: Fix the test to remove extra hint. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Respect AnalysisOptions.hint == false. Created 5 years, 6 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 | « no previous file | 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 2fee33496e812e92833f642e7a508937b4f415ce..be50fd4819a5f6a1f1561292009a19ddd1e51aaa 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -2383,6 +2383,14 @@ class GenerateHintsTask extends SourceBasedAnalysisTask {
@override
void internalPerform() {
+ AnalysisOptions analysisOptions = context.analysisOptions;
+ if (!analysisOptions.hint) {
+ outputs[HINTS] = AnalysisError.NO_ERRORS;
+ return;
+ }
+ //
+ // Prepare collectors.
+ //
RecordingErrorListener errorListener = new RecordingErrorListener();
Source source = getRequiredSource();
ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
@@ -2417,7 +2425,7 @@ class GenerateHintsTask extends SourceBasedAnalysisTask {
unitElement.accept(visitor);
}
// Dart2js analysis.
- if (context.analysisOptions.dart2jsHint) {
+ if (analysisOptions.dart2jsHint) {
unit.accept(new Dart2JSVerifier(errorReporter));
}
// Dart best practices.
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698