| 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 engine.error; | 5 library engine.error; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'ast.dart' show AstNode; | 9 import 'ast.dart' show AstNode; |
| 10 import 'element.dart'; | 10 import 'element.dart'; |
| (...skipping 2959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2970 static const HintCode UNUSED_FIELD = const HintCode( | 2970 static const HintCode UNUSED_FIELD = const HintCode( |
| 2971 'UNUSED_FIELD', "The value of the field '{0}' is not used"); | 2971 'UNUSED_FIELD', "The value of the field '{0}' is not used"); |
| 2972 | 2972 |
| 2973 /** | 2973 /** |
| 2974 * Unused imports are imports which are never used. | 2974 * Unused imports are imports which are never used. |
| 2975 */ | 2975 */ |
| 2976 static const HintCode UNUSED_IMPORT = | 2976 static const HintCode UNUSED_IMPORT = |
| 2977 const HintCode('UNUSED_IMPORT', "Unused import"); | 2977 const HintCode('UNUSED_IMPORT', "Unused import"); |
| 2978 | 2978 |
| 2979 /** | 2979 /** |
| 2980 * Unused catch exception variables. |
| 2981 */ |
| 2982 static const HintCode UNUSED_CATCH_CLAUSE = const HintCode( |
| 2983 'UNUSED_CATCH_CLAUSE', |
| 2984 "The exception variable '{0}' is not used, so the 'catch' clause can be re
moved"); |
| 2985 |
| 2986 /** |
| 2987 * Unused catch stack trace variables. |
| 2988 */ |
| 2989 static const HintCode UNUSED_CATCH_STACK = const HintCode( |
| 2990 'UNUSED_CATCH_STACK', |
| 2991 "The stack trace variable '{0}' is not used and can be removed"); |
| 2992 |
| 2993 /** |
| 2980 * Unused local variables are local varaibles which are never read. | 2994 * Unused local variables are local varaibles which are never read. |
| 2981 */ | 2995 */ |
| 2982 static const HintCode UNUSED_LOCAL_VARIABLE = const HintCode( | 2996 static const HintCode UNUSED_LOCAL_VARIABLE = const HintCode( |
| 2983 'UNUSED_LOCAL_VARIABLE', | 2997 'UNUSED_LOCAL_VARIABLE', |
| 2984 "The value of the local variable '{0}' is not used"); | 2998 "The value of the local variable '{0}' is not used"); |
| 2985 | 2999 |
| 2986 /** | 3000 /** |
| 2987 * Hint for cases where the source expects a method or function to return a | 3001 * Hint for cases where the source expects a method or function to return a |
| 2988 * non-void result, but the method or function signature returns void. | 3002 * non-void result, but the method or function signature returns void. |
| 2989 * | 3003 * |
| (...skipping 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4860 * Initialize a newly created error code to have the given [name]. | 4874 * Initialize a newly created error code to have the given [name]. |
| 4861 */ | 4875 */ |
| 4862 const TodoCode(String name) : super(name, "{0}"); | 4876 const TodoCode(String name) : super(name, "{0}"); |
| 4863 | 4877 |
| 4864 @override | 4878 @override |
| 4865 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 4879 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 4866 | 4880 |
| 4867 @override | 4881 @override |
| 4868 ErrorType get type => ErrorType.TODO; | 4882 ErrorType get type => ErrorType.TODO; |
| 4869 } | 4883 } |
| OLD | NEW |