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

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

Issue 2885063002: Analyzer CLI: fix machine format in build mode. (Closed)
Patch Set: Created 3 years, 7 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 | no next file » | 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 cde1ab8661bbc76fed1428e0f26ebcea24823a8f..34e2c163761d897208a454692f0e24c41e0ddc18 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -368,9 +368,13 @@ class BuildMode {
*/
void _printErrors({String outputPath}) {
StringBuffer buffer = new StringBuffer();
- ErrorFormatter formatter = new HumanErrorFormatter(buffer, options, stats,
- severityProcessor: (AnalysisError error) => determineProcessedSeverity(
- error, options, context.analysisOptions));
+ var severityProcessor = (AnalysisError error) =>
+ determineProcessedSeverity(error, options, context.analysisOptions);
+ ErrorFormatter formatter = options.machineFormat
+ ? new MachineErrorFormatter(buffer, options, stats,
+ severityProcessor: severityProcessor)
+ : new HumanErrorFormatter(buffer, options, stats,
+ severityProcessor: severityProcessor);
for (Source source in explicitSources) {
AnalysisErrorInfo errorInfo = context.getErrors(source);
formatter.formatErrors([errorInfo]);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698