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

Side by Side 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, 1 month 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analyzer.src.task.dart; 5 library analyzer.src.task.dart;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/generated/ast.dart'; 10 import 'package:analyzer/src/generated/ast.dart';
(...skipping 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 void internalPerform() { 2108 void internalPerform() {
2109 List<List<AnalysisError>> errorLists = <List<AnalysisError>>[]; 2109 List<List<AnalysisError>> errorLists = <List<AnalysisError>>[];
2110 // 2110 //
2111 // Prepare inputs. 2111 // Prepare inputs.
2112 // 2112 //
2113 EnginePlugin enginePlugin = AnalysisEngine.instance.enginePlugin; 2113 EnginePlugin enginePlugin = AnalysisEngine.instance.enginePlugin;
2114 for (ResultDescriptor result in enginePlugin.dartErrorsForSource) { 2114 for (ResultDescriptor result in enginePlugin.dartErrorsForSource) {
2115 String inputName = result.name + '_input'; 2115 String inputName = result.name + '_input';
2116 errorLists.add(getRequiredInput(inputName)); 2116 errorLists.add(getRequiredInput(inputName));
2117 } 2117 }
2118
2119 //
2120 // Gather error filters.
2121 //
2122 List<ErrorFilter> filters =
2123 context.getConfigurationData(CONFIGURED_ERROR_FILTERS);
2118 for (ResultDescriptor result in enginePlugin.dartErrorsForUnit) { 2124 for (ResultDescriptor result in enginePlugin.dartErrorsForUnit) {
2119 String inputName = result.name + '_input'; 2125 String inputName = result.name + '_input';
2120 Map<Source, List<AnalysisError>> errorMap = getRequiredInput(inputName); 2126 Map<Source, List<AnalysisError>> errorMap = getRequiredInput(inputName);
2121 for (List<AnalysisError> errors in errorMap.values) { 2127 for (List<AnalysisError> errors in errorMap.values) {
2122 errorLists.add(errors); 2128 errorLists.add(errors
2129 .where((AnalysisError error) {
2130 return !filters.any((ErrorFilter filter) => filter(error));
2131 })
2132 .toList());
2123 } 2133 }
2124 } 2134 }
2125 // 2135 //
2126 // Record outputs. 2136 // Record outputs.
2127 // 2137 //
2128 outputs[DART_ERRORS] = AnalysisError.mergeLists(errorLists); 2138 outputs[DART_ERRORS] = AnalysisError.mergeLists(errorLists);
2129 } 2139 }
2130 2140
2131 /** 2141 /**
2132 * Return a map from the names of the inputs of this kind of task to the task 2142 * Return a map from the names of the inputs of this kind of task to the task
(...skipping 2613 matching lines...) Expand 10 before | Expand all | Expand 10 after
4746 4756
4747 @override 4757 @override
4748 bool moveNext() { 4758 bool moveNext() {
4749 if (_newSources.isEmpty) { 4759 if (_newSources.isEmpty) {
4750 return false; 4760 return false;
4751 } 4761 }
4752 currentTarget = _newSources.removeLast(); 4762 currentTarget = _newSources.removeLast();
4753 return true; 4763 return true;
4754 } 4764 }
4755 } 4765 }
OLDNEW
« 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