Fix analyzer error messages.
Will have the result of restoring `[static warning]` to `[warning]`, etc. (This is essentially how we handle it in the analyzer CLI.)
This commit is contained in:
parent
11a54dee01
commit
96de7c4dcc
@ -214,7 +214,16 @@ class AnalysisErrorDescription {
|
||||
|
||||
ErrorCode get errorCode => error.errorCode;
|
||||
|
||||
String get errorType => error.errorCode.type.displayName;
|
||||
String get errorType {
|
||||
ErrorSeverity severity = errorCode.errorSeverity;
|
||||
if (severity == ErrorSeverity.INFO) {
|
||||
if (errorCode.type == ErrorType.HINT ||
|
||||
errorCode.type == ErrorType.LINT) {
|
||||
return errorCode.type.displayName;
|
||||
}
|
||||
}
|
||||
return severity.displayName;
|
||||
}
|
||||
|
||||
LineInfo_Location get location => line.getLocation(error.offset);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user