| 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]);
|
|
|