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:
pq 2016-05-06 13:39:48 -07:00
parent 11a54dee01
commit 96de7c4dcc

View File

@ -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);