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

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

Issue 2793813002: Fix an issue with duplicate reported analysis errors. (Closed)
Patch Set: Merge branch 'master' into fix_duplicate_errors Created 3 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 | « pkg/analyzer_cli/lib/src/analyzer_impl.dart ('k') | pkg/analyzer_cli/lib/src/driver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 985511db795d58c303585312c7a6a99c3d020c48..07ef826d344e5051f0afc18225fb37faf8c0ef90 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -243,8 +243,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);
}
@@ -332,16 +332,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);
}
« no previous file with comments | « pkg/analyzer_cli/lib/src/analyzer_impl.dart ('k') | pkg/analyzer_cli/lib/src/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698