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

Unified Diff: tests/compiler/dart2js/analyze_helper.dart

Issue 152593002: Version 1.2.0-dev.3.1 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 11 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 | « tests/compiler/dart2js/analyze_api_test.dart ('k') | tests/compiler/dart2js/analyze_only_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/analyze_helper.dart
===================================================================
--- tests/compiler/dart2js/analyze_helper.dart (revision 32236)
+++ tests/compiler/dart2js/analyze_helper.dart (working copy)
@@ -30,6 +30,7 @@
bool hasWarnings = false;
bool hasHint = false;
bool hasErrors = false;
+ bool lastWasWhitelisted = false;
Map<String, Map<String, int>> whiteListMap
= new Map<String, Map<String, int>>();
@@ -99,6 +100,7 @@
if (kind == api.Diagnostic.WARNING) {
if (checkWhiteList(uri, message)) {
// Suppress whitelisted warnings.
+ lastWasWhitelisted = true;
return;
}
hasWarnings = true;
@@ -106,6 +108,7 @@
if (kind == api.Diagnostic.HINT) {
if (checkWhiteList(uri, message)) {
// Suppress whitelisted hints.
+ lastWasWhitelisted = true;
return;
}
hasHint = true;
@@ -113,10 +116,15 @@
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);
}
}
« no previous file with comments | « tests/compiler/dart2js/analyze_api_test.dart ('k') | tests/compiler/dart2js/analyze_only_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698