show the error code in flutter analyze --watch
This commit is contained in:
parent
a237b47c41
commit
29df9f5582
@ -465,8 +465,11 @@ class AnalyzeCommand extends FlutterCommand {
|
|||||||
|
|
||||||
errors.sort();
|
errors.sort();
|
||||||
|
|
||||||
for (AnalysisError error in errors)
|
for (AnalysisError error in errors) {
|
||||||
printStatus(error.toString());
|
printStatus(error.toString());
|
||||||
|
if (error.code != null)
|
||||||
|
printTrace('error code: ${error.code}');
|
||||||
|
}
|
||||||
|
|
||||||
// Print an analysis summary.
|
// Print an analysis summary.
|
||||||
String errorsMessage;
|
String errorsMessage;
|
||||||
@ -744,6 +747,7 @@ class AnalysisError implements Comparable<AnalysisError> {
|
|||||||
int get severityLevel => _severityMap[severity] ?? 0;
|
int get severityLevel => _severityMap[severity] ?? 0;
|
||||||
String get type => json['type'];
|
String get type => json['type'];
|
||||||
String get message => json['message'];
|
String get message => json['message'];
|
||||||
|
String get code => json['code'];
|
||||||
|
|
||||||
String get file => json['location']['file'];
|
String get file => json['location']['file'];
|
||||||
int get startLine => json['location']['startLine'];
|
int get startLine => json['location']['startLine'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user