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

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: 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: 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 0154d739978d78ad0672cfdbb29af0c6c81b6ca8..9d9ea687b1e45633838867b7958cf8b335b3db7a 100644
--- a/pkg/analyzer_cli/lib/src/error_formatter.dart
+++ b/pkg/analyzer_cli/lib/src/error_formatter.dart
@@ -21,6 +21,10 @@ typedef ProcessedSeverity _SeverityProcessor(AnalysisError error);
/// The two format options are a user consumable format and a machine consumable
/// format.
class ErrorFormatter {
+ /// The total number of errors sent to [formatErrors].
+ static int get inputErrorCount => _inputErrorCount;
+ static int _inputErrorCount = 0;
Brian Wilkerson 2016/03/18 14:13:17 This looks like it's duplicating some work that Ph
skybrian 2016/03/18 22:32:44 It's a slightly different statistic. Merged into A
+
final StringSink out;
final CommandLineOptions options;
final _SeverityProcessor processSeverity;
@@ -83,6 +87,8 @@ class ErrorFormatter {
}
void formatErrors(List<AnalysisErrorInfo> errorInfos) {
+ _inputErrorCount += errorInfos.length;
+
var errors = new List<AnalysisError>();
var errorToLine = new Map<AnalysisError, LineInfo>();
for (AnalysisErrorInfo errorInfo in errorInfos) {

Powered by Google App Engine
This is Rietveld 408576698