Index: pkg/analysis_server/lib/src/protocol_server.dart |
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart |
index 822727cc13c111c7f9961cb2459c251e51585683..00f749e5a00d61d9bc6b7478ea955207c1eebdb2 100644 |
--- a/pkg/analysis_server/lib/src/protocol_server.dart |
+++ b/pkg/analysis_server/lib/src/protocol_server.dart |
@@ -111,16 +111,17 @@ AnalysisError newAnalysisError_fromEngine( |
location = new Location(file, offset, length, startLine, startColumn); |
} |
- // Deafult to the error's severity if none is specified. |
+ // Default to the error's severity if none is specified. |
errorSeverity ??= errorCode.errorSeverity; |
// done |
var severity = new AnalysisErrorSeverity(errorSeverity.name); |
var type = new AnalysisErrorType(errorCode.type.name); |
String message = error.message; |
+ String code = errorCode.name.toLowerCase(); |
String correction = error.correction; |
bool fix = hasFix(error.errorCode); |
- return new AnalysisError(severity, type, location, message, |
+ return new AnalysisError(severity, type, location, message, code, |
correction: correction, hasFix: fix); |
} |