From 29df9f5582fbb05d988621a8c2880658ca2cdb07 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 11 Mar 2016 12:08:34 -0800 Subject: [PATCH] show the error code in flutter analyze --watch --- packages/flutter_tools/lib/src/commands/analyze.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/commands/analyze.dart b/packages/flutter_tools/lib/src/commands/analyze.dart index 7b16256c78..1fd9739ae2 100644 --- a/packages/flutter_tools/lib/src/commands/analyze.dart +++ b/packages/flutter_tools/lib/src/commands/analyze.dart @@ -465,8 +465,11 @@ class AnalyzeCommand extends FlutterCommand { errors.sort(); - for (AnalysisError error in errors) + for (AnalysisError error in errors) { printStatus(error.toString()); + if (error.code != null) + printTrace('error code: ${error.code}'); + } // Print an analysis summary. String errorsMessage; @@ -744,6 +747,7 @@ class AnalysisError implements Comparable { int get severityLevel => _severityMap[severity] ?? 0; String get type => json['type']; String get message => json['message']; + String get code => json['code']; String get file => json['location']['file']; int get startLine => json['location']['startLine'];