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

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

Issue 2793813002: Fix an issue with duplicate reported analysis errors. (Closed)
Patch Set: Created 3 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/build_mode.dart
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index b68476b8b1a2c7d9d39d70c0612449e657d428dd..d46bc595f74e3ccbba25c0bcc1b72644811b3bf5 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -229,8 +229,8 @@ class BuildMode {
for (Source source in explicitSources) {
AnalysisErrorInfo errorInfo = context.getErrors(source);
for (AnalysisError error in errorInfo.errors) {
- ProcessedSeverity processedSeverity =
- processError(error, options, context.analysisOptions);
+ ProcessedSeverity processedSeverity = determineProcessedSeverity(
+ error, options, context.analysisOptions);
if (processedSeverity != null) {
maxSeverity = maxSeverity.max(processedSeverity.severity);
}
@@ -318,16 +318,14 @@ class BuildMode {
*/
void _printErrors({String outputPath}) {
StringBuffer buffer = new StringBuffer();
- ErrorFormatter formatter = new ErrorFormatter(
- buffer,
- options,
- stats,
- (AnalysisError error) =>
- processError(error, options, context.analysisOptions));
+ ErrorFormatter formatter = new HumanErrorFormatter(buffer, options, stats,
+ severityProcessor: (AnalysisError error) => determineProcessedSeverity(
+ error, options, context.analysisOptions));
for (Source source in explicitSources) {
AnalysisErrorInfo errorInfo = context.getErrors(source);
formatter.formatErrors([errorInfo]);
}
+ formatter.flush();
if (!options.machineFormat) {
stats.print(buffer);
}

Powered by Google App Engine
This is Rietveld 408576698