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

Unified Diff: pkg/analyzer/lib/source/error_processor.dart

Issue 1813973002: Don't upgrade the severity of *everything* to an error in strong mode. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/source/error_processor_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/source/error_processor.dart
diff --git a/pkg/analyzer/lib/source/error_processor.dart b/pkg/analyzer/lib/source/error_processor.dart
index 6b69cb71fe24ab6d1049a89088f36faa637015b4..d9049cb70820f86952f555d5d9415853b59f7c9e 100644
--- a/pkg/analyzer/lib/source/error_processor.dart
+++ b/pkg/analyzer/lib/source/error_processor.dart
@@ -94,20 +94,18 @@ class ErrorProcessor {
return null;
}
- // By default, the error is not processed.
- ErrorProcessor processor;
+ // Let the user configure how specific errors are processed.
+ List<ErrorProcessor> processors =
+ context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS);
// Give strong mode a chance to upgrade it.
if (context.analysisOptions.strongMode) {
- processor = _StrongModeTypeErrorProcessor.instance;
+ processors = processors.toList();
Brian Wilkerson 2016/03/17 19:54:14 It looks like it should already be a list. Is 'get
Bob Nystrom 2016/03/17 19:58:25 It is a list, but I want to copy it so I don't mut
+ processors.add(_StrongModeTypeErrorProcessor.instance);
}
- // Let the user configure how specific errors are processed.
- List<ErrorProcessor> processors =
- context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS);
-
return processors.firstWhere((ErrorProcessor p) => p.appliesTo(error),
- orElse: () => processor);
+ orElse: () => null);
}
}
« no previous file with comments | « no previous file | pkg/analyzer/test/source/error_processor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698