Commit f3dc82ab authored by Devon Carew's avatar Devon Carew

Merge pull request #2616 from devoncarew/show_error_code

show the error codes in flutter analyze --watch
parents 1d8117e2 29df9f55
......@@ -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<AnalysisError> {
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'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment