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

Unified Diff: pkg/analyzer/lib/src/analyzer_impl.dart

Issue 207693002: Don't print TODOs in Dart based analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: comments Created 6 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/error_formatter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/analyzer_impl.dart
diff --git a/pkg/analyzer/lib/src/analyzer_impl.dart b/pkg/analyzer/lib/src/analyzer_impl.dart
index b91aa1073fb41a4c03780594edb7b698ece4ee34..af2472573e878bc3691b76efc60dcdd9c3496bdc 100644
--- a/pkg/analyzer/lib/src/analyzer_impl.dart
+++ b/pkg/analyzer/lib/src/analyzer_impl.dart
@@ -153,6 +153,8 @@ class AnalyzerImpl {
});
}
+ bool _excludeTodo(AnalysisError error) => error.errorCode.type != ErrorType.TODO;
+
_printErrorsAndPerf() {
// The following is a hack. We currently print out to stderr to ensure that
// when in batch mode we print to stderr, this is because the prints from
@@ -163,7 +165,7 @@ class AnalyzerImpl {
IOSink sink = options.machineFormat ? stderr : stdout;
// print errors
- ErrorFormatter formatter = new ErrorFormatter(sink, options);
+ ErrorFormatter formatter = new ErrorFormatter(sink, options, _excludeTodo);
formatter.formatErrors(errorInfos);
// print performance numbers
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/error_formatter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698