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

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

Issue 1870123002: Suppress TODOs (#26215). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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_cli/test/driver_test.dart » ('j') | pkg/analyzer_cli/test/driver_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/analyzer_impl.dart
diff --git a/pkg/analyzer_cli/lib/src/analyzer_impl.dart b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
index e6f13707d40170bec535ed57c8c5e1cfd4f4a5f3..7314a20729a2ae4001e7021484d81af35b9bfc31 100644
--- a/pkg/analyzer_cli/lib/src/analyzer_impl.dart
+++ b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
@@ -303,6 +303,13 @@ class AnalyzerImpl {
ErrorSeverity severity = computeSeverity(error, options, context);
bool isOverridden = false;
+ // Skip TODOs categorically (unless escalated to ERROR or HINT.)
+ // https://github.com/dart-lang/sdk/issues/26215
+ if (error.errorCode.type == ErrorType.TODO &&
+ severity == ErrorSeverity.INFO) {
+ return null;
+ }
+
// First check for a filter.
if (severity == null) {
// Null severity means the error has been explicitly ignored.
@@ -317,11 +324,6 @@ class AnalyzerImpl {
if (severity == ErrorSeverity.INFO && options.disableHints) {
return null;
}
-
- // Skip TODOs.
- if (severity == ErrorType.TODO) {
- return null;
- }
}
return new ProcessedSeverity(severity, isOverridden);
« no previous file with comments | « no previous file | pkg/analyzer_cli/test/driver_test.dart » ('j') | pkg/analyzer_cli/test/driver_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698