Version 1.24.0-dev.4.2
Cherry-pick 42ef3eb144a1e9f6c0f5944f516196574b52b88d into dev
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index cde1ab8..34e2c16 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -368,9 +368,13 @@
*/
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]);
diff --git a/tools/VERSION b/tools/VERSION
index ccc25ab..ce6e3f7 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -28,4 +28,4 @@
MINOR 24
PATCH 0
PRERELEASE 4
-PRERELEASE_PATCH 1
+PRERELEASE_PATCH 2