@@ -79,11 +79,11 @@ abstract class ErrorCode {
7979 /**
8080 * The severity of the error.
8181 */
82- ErrorSeverity get errorSeverity;
82+ DiagnosticSeverity get errorSeverity;
8383
8484 /// Whether a finding of this error is ignorable via comments such as
8585 /// `// ignore:` or `// ignore_for_file:` .
86- bool get isIgnorable => errorSeverity != ErrorSeverity .ERROR ;
86+ bool get isIgnorable => errorSeverity != DiagnosticSeverity .ERROR ;
8787
8888 /**
8989 * The template used to create the problem message to be displayed for this
@@ -165,14 +165,8 @@ class ErrorSeverity implements Comparable<ErrorSeverity> {
165165
166166 static const List <ErrorSeverity > values = const [NONE , INFO , WARNING , ERROR ];
167167
168- /**
169- * The name of this error code.
170- */
171168 final String name;
172169
173- /**
174- * The ordinal value of the error code.
175- */
176170 final int ordinal;
177171
178172 /**
@@ -185,9 +179,6 @@ class ErrorSeverity implements Comparable<ErrorSeverity> {
185179 */
186180 final String displayName;
187181
188- /**
189- * Initialize a newly created severity with the given names.
190- */
191182 const ErrorSeverity (
192183 this .name, this .ordinal, this .machineCode, this .displayName);
193184
@@ -220,52 +211,52 @@ class DiagnosticType implements Comparable<DiagnosticType> {
220211 * Task (todo) comments in user code.
221212 */
222213 static const DiagnosticType TODO =
223- const DiagnosticType ('TODO' , 0 , ErrorSeverity .INFO );
214+ const DiagnosticType ('TODO' , 0 , DiagnosticSeverity .INFO );
224215
225216 /**
226217 * Extra analysis run over the code to follow best practices, which are not in
227218 * the Dart Language Specification.
228219 */
229220 static const DiagnosticType HINT =
230- const DiagnosticType ('HINT' , 1 , ErrorSeverity .INFO );
221+ const DiagnosticType ('HINT' , 1 , DiagnosticSeverity .INFO );
231222
232223 /**
233224 * Compile-time errors are errors that preclude execution. A compile time
234225 * error must be reported by a Dart compiler before the erroneous code is
235226 * executed.
236227 */
237228 static const DiagnosticType COMPILE_TIME_ERROR =
238- const DiagnosticType ('COMPILE_TIME_ERROR' , 2 , ErrorSeverity .ERROR );
229+ const DiagnosticType ('COMPILE_TIME_ERROR' , 2 , DiagnosticSeverity .ERROR );
239230
240231 /**
241232 * Checked mode compile-time errors are errors that preclude execution in
242233 * checked mode.
243234 */
244235 static const DiagnosticType CHECKED_MODE_COMPILE_TIME_ERROR =
245236 const DiagnosticType (
246- 'CHECKED_MODE_COMPILE_TIME_ERROR' , 3 , ErrorSeverity .ERROR );
237+ 'CHECKED_MODE_COMPILE_TIME_ERROR' , 3 , DiagnosticSeverity .ERROR );
247238
248239 /**
249240 * Static warnings are those warnings reported by the static checker. They
250241 * have no effect on execution. Static warnings must be provided by Dart
251242 * compilers used during development.
252243 */
253244 static const DiagnosticType STATIC_WARNING =
254- const DiagnosticType ('STATIC_WARNING' , 4 , ErrorSeverity .WARNING );
245+ const DiagnosticType ('STATIC_WARNING' , 4 , DiagnosticSeverity .WARNING );
255246
256247 /**
257248 * Syntactic errors are errors produced as a result of input that does not
258249 * conform to the grammar.
259250 */
260251 static const DiagnosticType SYNTACTIC_ERROR =
261- const DiagnosticType ('SYNTACTIC_ERROR' , 6 , ErrorSeverity .ERROR );
252+ const DiagnosticType ('SYNTACTIC_ERROR' , 6 , DiagnosticSeverity .ERROR );
262253
263254 /**
264255 * Lint warnings describe style and best practice recommendations that can be
265256 * used to formalize a project's style guidelines.
266257 */
267258 static const DiagnosticType LINT =
268- const DiagnosticType ('LINT' , 7 , ErrorSeverity .INFO );
259+ const DiagnosticType ('LINT' , 7 , DiagnosticSeverity .INFO );
269260
270261 static const List <DiagnosticType > values = const [
271262 TODO ,
@@ -290,7 +281,7 @@ class DiagnosticType implements Comparable<DiagnosticType> {
290281 /**
291282 * The severity of this type of error.
292283 */
293- final ErrorSeverity severity;
284+ final DiagnosticSeverity severity;
294285
295286 /**
296287 * Initialize a newly created error type to have the given [name] and
0 commit comments