| 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 2689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2700 HintCode.UNNECESSARY_CAST, | 2700 HintCode.UNNECESSARY_CAST, |
| 2701 HintCode.UNNECESSARY_NO_SUCH_METHOD, | 2701 HintCode.UNNECESSARY_NO_SUCH_METHOD, |
| 2702 HintCode.UNNECESSARY_TYPE_CHECK_FALSE, | 2702 HintCode.UNNECESSARY_TYPE_CHECK_FALSE, |
| 2703 HintCode.UNNECESSARY_TYPE_CHECK_TRUE, | 2703 HintCode.UNNECESSARY_TYPE_CHECK_TRUE, |
| 2704 HintCode.UNUSED_ELEMENT, | 2704 HintCode.UNUSED_ELEMENT, |
| 2705 HintCode.UNUSED_FIELD, | 2705 HintCode.UNUSED_FIELD, |
| 2706 HintCode.UNUSED_IMPORT, | 2706 HintCode.UNUSED_IMPORT, |
| 2707 HintCode.UNUSED_CATCH_CLAUSE, | 2707 HintCode.UNUSED_CATCH_CLAUSE, |
| 2708 HintCode.UNUSED_CATCH_STACK, | 2708 HintCode.UNUSED_CATCH_STACK, |
| 2709 HintCode.UNUSED_LOCAL_VARIABLE, | 2709 HintCode.UNUSED_LOCAL_VARIABLE, |
| 2710 HintCode.UNUSED_SHOWN_NAME, |
| 2710 HintCode.USE_OF_VOID_RESULT, | 2711 HintCode.USE_OF_VOID_RESULT, |
| 2711 HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE, | 2712 HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE, |
| 2712 HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, | 2713 HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, |
| 2713 HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT, | 2714 HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT, |
| 2714 HtmlErrorCode.PARSE_ERROR, | 2715 HtmlErrorCode.PARSE_ERROR, |
| 2715 HtmlWarningCode.INVALID_URI, | 2716 HtmlWarningCode.INVALID_URI, |
| 2716 HtmlWarningCode.URI_DOES_NOT_EXIST, | 2717 HtmlWarningCode.URI_DOES_NOT_EXIST, |
| 2717 StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, | 2718 StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, |
| 2718 StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, | 2719 StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, |
| 2719 StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, | 2720 StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, |
| (...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3772 "The stack trace variable '{0}' is not used and can be removed"); | 3773 "The stack trace variable '{0}' is not used and can be removed"); |
| 3773 | 3774 |
| 3774 /** | 3775 /** |
| 3775 * Unused local variables are local variables which are never read. | 3776 * Unused local variables are local variables which are never read. |
| 3776 */ | 3777 */ |
| 3777 static const HintCode UNUSED_LOCAL_VARIABLE = const HintCode( | 3778 static const HintCode UNUSED_LOCAL_VARIABLE = const HintCode( |
| 3778 'UNUSED_LOCAL_VARIABLE', | 3779 'UNUSED_LOCAL_VARIABLE', |
| 3779 "The value of the local variable '{0}' is not used"); | 3780 "The value of the local variable '{0}' is not used"); |
| 3780 | 3781 |
| 3781 /** | 3782 /** |
| 3783 * Unused shown names are names shown on imports which are never used. |
| 3784 */ |
| 3785 static const HintCode UNUSED_SHOWN_NAME = |
| 3786 const HintCode('UNUSED_SHOWN_NAME', "The name {0} is shown, but not used."
); |
| 3787 |
| 3788 /** |
| 3782 * Hint for cases where the source expects a method or function to return a | 3789 * Hint for cases where the source expects a method or function to return a |
| 3783 * non-void result, but the method or function signature returns void. | 3790 * non-void result, but the method or function signature returns void. |
| 3784 * | 3791 * |
| 3785 * Parameters: | 3792 * Parameters: |
| 3786 * 0: the name of the method or function that returns void | 3793 * 0: the name of the method or function that returns void |
| 3787 */ | 3794 */ |
| 3788 static const HintCode USE_OF_VOID_RESULT = const HintCode( | 3795 static const HintCode USE_OF_VOID_RESULT = const HintCode( |
| 3789 'USE_OF_VOID_RESULT', | 3796 'USE_OF_VOID_RESULT', |
| 3790 "The result of '{0}' is being used, even though it is declared to be 'void
'"); | 3797 "The result of '{0}' is being used, even though it is declared to be 'void
'"); |
| 3791 | 3798 |
| (...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5768 * Initialize a newly created error code to have the given [name]. | 5775 * Initialize a newly created error code to have the given [name]. |
| 5769 */ | 5776 */ |
| 5770 const TodoCode(String name) : super(name, "{0}"); | 5777 const TodoCode(String name) : super(name, "{0}"); |
| 5771 | 5778 |
| 5772 @override | 5779 @override |
| 5773 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 5780 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 5774 | 5781 |
| 5775 @override | 5782 @override |
| 5776 ErrorType get type => ErrorType.TODO; | 5783 ErrorType get type => ErrorType.TODO; |
| 5777 } | 5784 } |
| OLD | NEW |