Chromium Code Reviews| Index: tests/compiler/dart2js/analyze_helper.dart |
| diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart |
| index 47deb90bd118d596fa4572fe52d408c5abcfb1b9..585468ae7083f08b8860041dcc38559d49681b5f 100644 |
| --- a/tests/compiler/dart2js/analyze_helper.dart |
| +++ b/tests/compiler/dart2js/analyze_helper.dart |
| @@ -30,6 +30,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler { |
| bool hasWarnings = false; |
| bool hasHint = false; |
| bool hasErrors = false; |
| + bool lastWasWhitelisted = false; |
|
karlklose
2014/01/28 12:27:45
It would be nice if Infos carried a reference to t
Johnni Winther
2014/01/31 12:29:30
Added a TODO.
|
| Map<String, Map<String, int>> whiteListMap |
| = new Map<String, Map<String, int>>(); |
| @@ -99,6 +100,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler { |
| if (kind == api.Diagnostic.WARNING) { |
| if (checkWhiteList(uri, message)) { |
| // Suppress whitelisted warnings. |
| + lastWasWhitelisted = true; |
| return; |
| } |
| hasWarnings = true; |
| @@ -106,6 +108,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler { |
| if (kind == api.Diagnostic.HINT) { |
| if (checkWhiteList(uri, message)) { |
| // Suppress whitelisted hints. |
| + lastWasWhitelisted = true; |
| return; |
| } |
| hasHint = true; |
| @@ -113,10 +116,15 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler { |
| if (kind == api.Diagnostic.ERROR) { |
| if (checkWhiteList(uri, message)) { |
| // Suppress whitelisted errors. |
| + lastWasWhitelisted = true; |
| return; |
| } |
| hasErrors = true; |
| } |
| + if (kind == api.Diagnostic.INFO && lastWasWhitelisted) { |
| + return; |
| + } |
| + lastWasWhitelisted = false; |
| super.diagnosticHandler(uri, begin, end, message, kind); |
| } |
| } |