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

Unified Diff: dart/tools/testing/dart/test_runner.dart

Issue 78483002: Remove filtering of analyzer warnings/errors by filename (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dart/tests/lib/analyzer/analyze_library.status ('k') | dart/tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/test_runner.dart
diff --git a/dart/tools/testing/dart/test_runner.dart b/dart/tools/testing/dart/test_runner.dart
index 34346289161501adffe8a467f8ea6de3bdd88444..e5205b1ae9a09a96680ed2762982e7c7d6077699 100644
--- a/dart/tools/testing/dart/test_runner.dart
+++ b/dart/tools/testing/dart/test_runner.dart
@@ -312,30 +312,23 @@ class BrowserTestCommand extends Command {
class AnalysisCommand extends Command {
final String flavor;
- // If [fileFilter] is given, only errors/warnings reported by the analyzer
- // for which [fileFilter] returns [:true:] are considered.
- final Function fileFilter;
-
AnalysisCommand._(this.flavor,
String displayName,
String executable,
List<String> arguments,
- String configurationDir,
- this.fileFilter)
+ String configurationDir)
: super._(displayName, executable, arguments, configurationDir);
void _buildHashCode(HashCodeBuilder builder) {
super._buildHashCode(builder);
builder.add(flavor);
- builder.add(fileFilter);
}
bool _equal(Command other) {
return
other is AnalysisCommand &&
super._equal(other) &&
- flavor == other.flavor &&
- fileFilter == other.fileFilter;
+ flavor == other.flavor;
}
}
@@ -404,10 +397,9 @@ class CommandBuilder {
AnalysisCommand getAnalysisCommand(
String displayName, executable, arguments, String configurationDir,
- {String flavor: 'dartanalyzer', Function fileFilter: null}) {
+ {String flavor: 'dartanalyzer'}) {
var command = new AnalysisCommand._(
- flavor, displayName, executable, arguments, configurationDir,
- fileFilter);
+ flavor, displayName, executable, arguments, configurationDir);
return _getUniqueCommand(command);
}
@@ -1160,11 +1152,6 @@ class AnalysisCommandOutputImpl extends CommandOutputImpl {
void parseAnalyzerOutput(List<String> outErrors, List<String> outWarnings) {
AnalysisCommand analysisCommand = command;
- Function fileFilter = analysisCommand.fileFilter;
- if (fileFilter == null) {
- // If no filter function was given, we don't filter the output at all.
- fileFilter = (arg) => true;
- }
// Parse a line delimited by the | character using \ as an escape charager
// like: FOO|BAR|FOO\|BAR|FOO\\BAZ as 4 fields: FOO BAR FOO|BAR FOO\BAZ
@@ -1195,12 +1182,10 @@ class AnalysisCommandOutputImpl extends CommandOutputImpl {
List<String> fields = splitMachineError(line);
// We only consider errors/warnings for files of interest.
if (fields.length > FILENAME) {
- if (fileFilter(fields[FILENAME])) {
- if (fields[ERROR_LEVEL] == 'ERROR') {
- outErrors.add(fields[FORMATTED_ERROR]);
- } else if (fields[ERROR_LEVEL] == 'WARNING') {
- outWarnings.add(fields[FORMATTED_ERROR]);
- }
+ if (fields[ERROR_LEVEL] == 'ERROR') {
+ outErrors.add(fields[FORMATTED_ERROR]);
+ } else if (fields[ERROR_LEVEL] == 'WARNING') {
+ outWarnings.add(fields[FORMATTED_ERROR]);
}
// OK to Skip error output that doesn't match the machine format
}
« no previous file with comments | « dart/tests/lib/analyzer/analyze_library.status ('k') | dart/tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698