| OLD | NEW |
| 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 analyzer.src.generated.error; | 5 library analyzer.src.generated.error; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart' show AstNode; | 9 import 'package:analyzer/dart/ast/ast.dart' show AstNode; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2677 HintCode.DEPRECATED_MEMBER_USE, | 2677 HintCode.DEPRECATED_MEMBER_USE, |
| 2678 HintCode.DUPLICATE_IMPORT, | 2678 HintCode.DUPLICATE_IMPORT, |
| 2679 HintCode.DIVISION_OPTIMIZATION, | 2679 HintCode.DIVISION_OPTIMIZATION, |
| 2680 HintCode.IS_DOUBLE, | 2680 HintCode.IS_DOUBLE, |
| 2681 HintCode.IS_INT, | 2681 HintCode.IS_INT, |
| 2682 HintCode.IS_NOT_DOUBLE, | 2682 HintCode.IS_NOT_DOUBLE, |
| 2683 HintCode.IS_NOT_INT, | 2683 HintCode.IS_NOT_INT, |
| 2684 HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION, | 2684 HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION, |
| 2685 HintCode.INVALID_ASSIGNMENT, | 2685 HintCode.INVALID_ASSIGNMENT, |
| 2686 HintCode.INVALID_USE_OF_PROTECTED_MEMBER, | 2686 HintCode.INVALID_USE_OF_PROTECTED_MEMBER, |
| 2687 HintCode.MISSING_JS_LIB_ANNOTATION, |
| 2687 HintCode.MISSING_REQUIRED_PARAM, | 2688 HintCode.MISSING_REQUIRED_PARAM, |
| 2688 HintCode.MISSING_RETURN, | 2689 HintCode.MISSING_RETURN, |
| 2689 HintCode.NULL_AWARE_IN_CONDITION, | 2690 HintCode.NULL_AWARE_IN_CONDITION, |
| 2690 HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER, | 2691 HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER, |
| 2691 HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD, | 2692 HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD, |
| 2692 HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER, | 2693 HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER, |
| 2693 HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE, | 2694 HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE, |
| 2694 HintCode.TYPE_CHECK_IS_NOT_NULL, | 2695 HintCode.TYPE_CHECK_IS_NOT_NULL, |
| 2695 HintCode.TYPE_CHECK_IS_NULL, | 2696 HintCode.TYPE_CHECK_IS_NULL, |
| 2696 HintCode.UNDEFINED_GETTER, | 2697 HintCode.UNDEFINED_GETTER, |
| (...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3577 * Generate a hint for a constructor, function or method invocation where a | 3578 * Generate a hint for a constructor, function or method invocation where a |
| 3578 * required parameter is missing. | 3579 * required parameter is missing. |
| 3579 * | 3580 * |
| 3580 * Parameters: | 3581 * Parameters: |
| 3581 * 0: the name of the parameter | 3582 * 0: the name of the parameter |
| 3582 * 1: an optional reason | 3583 * 1: an optional reason |
| 3583 */ | 3584 */ |
| 3584 static const HintCode MISSING_REQUIRED_PARAM = const HintCode( | 3585 static const HintCode MISSING_REQUIRED_PARAM = const HintCode( |
| 3585 'MISSING_REQUIRED_PARAM', "The parameter '{0}' is required. {1}"); | 3586 'MISSING_REQUIRED_PARAM', "The parameter '{0}' is required. {1}"); |
| 3586 | 3587 |
| 3588 /** |
| 3589 * Generate a hint for an element that is annotated with `@JS(...)` whose |
| 3590 * library declaration is not similarly annotated. |
| 3591 */ |
| 3592 static const HintCode MISSING_JS_LIB_ANNOTATION = const HintCode( |
| 3593 'MISSING_JS_LIB_ANNOTATION', |
| 3594 "The @JS() annotation can only be used if it is also declared on the libra
ry directive."); |
| 3595 |
| 3587 /** | 3596 /** |
| 3588 * Generate a hint for methods or functions that have a return type, but do | 3597 * Generate a hint for methods or functions that have a return type, but do |
| 3589 * not have a non-void return statement on all branches. At the end of methods | 3598 * not have a non-void return statement on all branches. At the end of methods |
| 3590 * or functions with no return, Dart implicitly returns `null`, avoiding these | 3599 * or functions with no return, Dart implicitly returns `null`, avoiding these |
| 3591 * implicit returns is considered a best practice. | 3600 * implicit returns is considered a best practice. |
| 3592 * | 3601 * |
| 3593 * Parameters: | 3602 * Parameters: |
| 3594 * 0: the name of the declared return type | 3603 * 0: the name of the declared return type |
| 3595 */ | 3604 */ |
| 3596 static const HintCode MISSING_RETURN = const HintCode( | 3605 static const HintCode MISSING_RETURN = const HintCode( |
| (...skipping 2171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5768 * Initialize a newly created error code to have the given [name]. | 5777 * Initialize a newly created error code to have the given [name]. |
| 5769 */ | 5778 */ |
| 5770 const TodoCode(String name) : super(name, "{0}"); | 5779 const TodoCode(String name) : super(name, "{0}"); |
| 5771 | 5780 |
| 5772 @override | 5781 @override |
| 5773 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 5782 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 5774 | 5783 |
| 5775 @override | 5784 @override |
| 5776 ErrorType get type => ErrorType.TODO; | 5785 ErrorType get type => ErrorType.TODO; |
| 5777 } | 5786 } |
| OLD | NEW |