Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Side by Side Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 1419673006: More options file validation (and API iteration). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library engine.error; 5 library engine.error;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:source_span/source_span.dart'; 9 import 'package:source_span/source_span.dart';
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 /** 289 /**
290 * Set the value of the given [property] to the given [value]. Using a value 290 * Set the value of the given [property] to the given [value]. Using a value
291 * of `null` will effectively remove the property from this error. 291 * of `null` will effectively remove the property from this error.
292 */ 292 */
293 void setProperty(ErrorProperty property, Object value) { 293 void setProperty(ErrorProperty property, Object value) {
294 _propertyMap[property] = value; 294 _propertyMap[property] = value;
295 } 295 }
296 } 296 }
297 297
298 /** 298 /**
299 * The error codes used for errors in analysis options files. 299 * The error codes used for errors in analysis options files. The convention for
300 * this class is for the name of the error code to indicate the problem that
301 * caused the error to be generated and for the error message to explain what is
302 * wrong and, when appropriate, how the problem can be corrected.
300 */ 303 */
301 class AnalysisOptionsErrorCode extends ErrorCode { 304 class AnalysisOptionsErrorCode extends ErrorCode {
302 /** 305 /**
303 * An error code indicating that there is a syntactic error in the file. 306 * An error code indicating that there is a syntactic error in the file.
304 * 307 *
305 * Parameters: 308 * Parameters:
306 * 0: the error message from the parse error 309 * 0: the error message from the parse error
307 */ 310 */
308 static const AnalysisOptionsErrorCode PARSE_ERROR = 311 static const AnalysisOptionsErrorCode PARSE_ERROR =
309 const AnalysisOptionsErrorCode('PARSE_ERROR', '{0}'); 312 const AnalysisOptionsErrorCode('PARSE_ERROR', '{0}');
310 313
311 /** 314 /**
312 * Initialize a newly created error code to have the given [name]. 315 * Initialize a newly created error code to have the given [name].
313 */ 316 */
314 const AnalysisOptionsErrorCode(String name, String message, 317 const AnalysisOptionsErrorCode(String name, String message,
315 [String correction]) 318 [String correction])
316 : super(name, message, correction); 319 : super(name, message, correction);
317 320
318 @override 321 @override
319 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR; 322 ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
320 323
321 @override 324 @override
322 ErrorType get type => ErrorType.COMPILE_TIME_ERROR; 325 ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
323 } 326 }
324 327
325 /** 328 /**
326 * The error codes used for warnings in analysis options files. 329 * The error codes used for warnings in analysis options files. The convention
330 * for this class is for the name of the error code to indicate the problem that
331 * caused the error to be generated and for the error message to explain what is
332 * wrong and, when appropriate, how the problem can be corrected.
327 */ 333 */
328 class AnalysisOptionsWarningCode extends ErrorCode { 334 class AnalysisOptionsWarningCode extends ErrorCode {
329 /** 335 /**
330 * An error code indicating that a plugin is being configured with an 336 * An error code indicating that a plugin is being configured with an
331 * unsupported option. 337 * unsupported option.
332 * 338 *
333 * Parameters: 339 * Parameters:
334 * 0: the plugin name 340 * 0: the plugin name
335 * 1: the unsupported option key 341 * 1: the unsupported option key
336 */ 342 */
(...skipping 4729 matching lines...) Expand 10 before | Expand all | Expand 10 after
5066 * Initialize a newly created error code to have the given [name]. 5072 * Initialize a newly created error code to have the given [name].
5067 */ 5073 */
5068 const TodoCode(String name) : super(name, "{0}"); 5074 const TodoCode(String name) : super(name, "{0}");
5069 5075
5070 @override 5076 @override
5071 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 5077 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
5072 5078
5073 @override 5079 @override
5074 ErrorType get type => ErrorType.TODO; 5080 ErrorType get type => ErrorType.TODO;
5075 } 5081 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/options.dart » ('j') | pkg/analyzer/lib/src/task/options.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698