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

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

Issue 1806263004: add --x-package-warnings-prefix option to dartanalyzer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: oops, check in all the test files 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
« no previous file with comments | « pkg/analyzer_cli/lib/src/driver.dart ('k') | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/error_formatter.dart
diff --git a/pkg/analyzer_cli/lib/src/error_formatter.dart b/pkg/analyzer_cli/lib/src/error_formatter.dart
index d6bec887fceac077fc55337eb2072dae4290c0d7..c43fcd8ab61fa54a9216af9b132901235b58b270 100644
--- a/pkg/analyzer_cli/lib/src/error_formatter.dart
+++ b/pkg/analyzer_cli/lib/src/error_formatter.dart
@@ -21,6 +21,9 @@ typedef ProcessedSeverity _SeverityProcessor(AnalysisError error);
/// Analysis statistics counter.
class AnalysisStats {
+ /// The total number of diagnostics sent to [formatErrors].
+ int unfilteredCount;
+
int errorCount;
int hintCount;
int lintCount;
@@ -30,8 +33,12 @@ class AnalysisStats {
init();
}
+ /// The total number of diagnostics reported to the user.
+ int get filteredCount => errorCount + warnCount + hintCount + lintCount;
+
/// (Re)set initial values.
void init() {
+ unfilteredCount = 0;
errorCount = 0;
hintCount = 0;
lintCount = 0;
@@ -162,6 +169,8 @@ class ErrorFormatter {
}
void formatErrors(List<AnalysisErrorInfo> errorInfos) {
+ stats.unfilteredCount += errorInfos.length;
+
var errors = new List<AnalysisError>();
var errorToLine = new Map<AnalysisError, LineInfo>();
for (AnalysisErrorInfo errorInfo in errorInfos) {
« no previous file with comments | « pkg/analyzer_cli/lib/src/driver.dart ('k') | pkg/analyzer_cli/lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698