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

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

Issue 1420363005: Error Suppression FTW. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Test fix. 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/analyzer/lib/src/generated/error.dart ('k') | pkg/analyzer/lib/src/task/options.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 f45c923d6924b2ae2439fc20678d15a1570f0ffb..ff360386f24a8aec8f976b2285f082673b6cf42e 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -2115,11 +2115,21 @@ class DartErrorsTask extends SourceBasedAnalysisTask {
String inputName = result.name + '_input';
errorLists.add(getRequiredInput(inputName));
}
+
+ //
+ // Gather error filters.
+ //
+ List<ErrorFilter> filters =
+ context.getConfigurationData(CONFIGURED_ERROR_FILTERS);
for (ResultDescriptor result in enginePlugin.dartErrorsForUnit) {
String inputName = result.name + '_input';
Map<Source, List<AnalysisError>> errorMap = getRequiredInput(inputName);
for (List<AnalysisError> errors in errorMap.values) {
- errorLists.add(errors);
+ errorLists.add(errors
+ .where((AnalysisError error) {
+ return !filters.any((ErrorFilter filter) => filter(error));
+ })
+ .toList());
}
}
//
« no previous file with comments | « pkg/analyzer/lib/src/generated/error.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698