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

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

Issue 1838903003: Make analyze_test_test less verbose (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
Index: tests/compiler/dart2js/analyze_helper.dart
diff --git a/tests/compiler/dart2js/analyze_helper.dart b/tests/compiler/dart2js/analyze_helper.dart
index 217b6f5117fe2daee96903cede9f949b03cf1b9c..2461c984ac897314d62b9178427f154b75c16847 100644
--- a/tests/compiler/dart2js/analyze_helper.dart
+++ b/tests/compiler/dart2js/analyze_helper.dart
@@ -17,6 +17,9 @@ import 'package:compiler/src/filenames.dart';
import 'package:compiler/src/source_file_provider.dart';
import 'package:compiler/src/util/uri_extras.dart';
+/// Option for hiding whitelisted messages.
+const String HIDE_WHITELISTED = '--hide-whitelisted';
+
/**
* Map of whitelisted warnings and errors.
*
@@ -34,6 +37,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
bool hasHint = false;
bool hasErrors = false;
bool lastWasWhitelisted = false;
+ bool showWhitelisted = true;
Map<String, Map<dynamic/*String|MessageKind*/, int>> whiteListMap
= new Map<String, Map<dynamic/*String|MessageKind*/, int>>();
@@ -113,7 +117,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
if (checkWhiteList(uri, message, text)) {
// Suppress whitelisted warnings.
lastWasWhitelisted = true;
- if (verbose) {
+ if (showWhitelisted || verbose) {
super.report(message, uri, begin, end, text, kind);
}
return;
@@ -124,7 +128,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
if (checkWhiteList(uri, message, text)) {
// Suppress whitelisted hints.
lastWasWhitelisted = true;
- if (verbose) {
+ if (showWhitelisted || verbose) {
super.report(message, uri, begin, end, text, kind);
}
return;
@@ -135,7 +139,7 @@ class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
if (checkWhiteList(uri, message, text)) {
// Suppress whitelisted errors.
lastWasWhitelisted = true;
- if (verbose) {
+ if (showWhitelisted || verbose) {
super.report(message, uri, begin, end, text, kind);
}
return;
@@ -204,6 +208,9 @@ Future analyze(List<Uri> uriList,
if (options.contains(Flags.verbose)) {
handler.verbose = true;
}
+ if (options.contains(HIDE_WHITELISTED)) {
+ handler.showWhitelisted = false;
+ }
Bill Hesse 2016/03/29 11:56:26 Are verbose and showWhitelisted only used together
Johnni Winther 2016/03/30 07:02:30 Verbose include (some very noisy) info messages wh
var compiler = new CompilerImpl(
provider,
null,
@@ -225,12 +232,15 @@ Future analyze(List<Uri> uriList,
if (mode == AnalysisMode.URI) {
for (Uri uri in uriList) {
+ print('Analyzing uri: $uri');
await compiler.analyzeUri(uri);
}
} else if (mode != AnalysisMode.TREE_SHAKING) {
+ print('Analyzing libraries: $uriList');
compiler.librariesToAnalyzeWhenRun = uriList;
await compiler.run(null);
} else {
+ print('Analyzing entry point: ${uriList.single}');
await compiler.run(uriList.single);
}
« no previous file with comments | « no previous file | tests/compiler/dart2js/analyze_test_test.dart » ('j') | tests/compiler/dart2js/analyze_test_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698