| 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.dart.error.hint_codes; | 5 library analyzer.src.dart.error.hint_codes; |
| 6 | 6 |
| 7 import 'package:analyzer/error/error.dart'; | 7 import 'package:analyzer/error/error.dart'; |
| 8 import 'package:analyzer/src/dart/element/element.dart'; | 8 import 'package:analyzer/src/dart/element/element.dart'; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 * | 88 * |
| 89 * Parameters: | 89 * Parameters: |
| 90 * 0: the name of the member | 90 * 0: the name of the member |
| 91 */ | 91 */ |
| 92 static const HintCode DEPRECATED_MEMBER_USE = const HintCode( | 92 static const HintCode DEPRECATED_MEMBER_USE = const HintCode( |
| 93 'DEPRECATED_MEMBER_USE', | 93 'DEPRECATED_MEMBER_USE', |
| 94 "'{0}' is deprecated and shouldn't be used.", | 94 "'{0}' is deprecated and shouldn't be used.", |
| 95 "Try replacing the use of the deprecated member with the replacement."); | 95 "Try replacing the use of the deprecated member with the replacement."); |
| 96 | 96 |
| 97 /** | 97 /** |
| 98 * Users should not create a class named `Function` anymore. | |
| 99 */ | |
| 100 static const HintCode DEPRECATED_FUNCTION_CLASS_DECLARATION = const HintCode( | |
| 101 'DEPRECATED_FUNCTION_CLASS_DECLARATION', | |
| 102 "Declaring a class named 'Function' is deprecated.", | |
| 103 "Try renaming the class."); | |
| 104 | |
| 105 /** | |
| 106 * `Function` should not be extended anymore. | |
| 107 */ | |
| 108 static const HintCode DEPRECATED_EXTENDS_FUNCTION = const HintCode( | |
| 109 'DEPRECATED_EXTENDS_FUNCTION', | |
| 110 "Extending 'Function' is deprecated.", | |
| 111 "Try removing 'Function' from the 'extends' clause."); | |
| 112 | |
| 113 /** | |
| 114 * `Function` should not be mixed in anymore. | |
| 115 */ | |
| 116 static const HintCode DEPRECATED_MIXIN_FUNCTION = const HintCode( | |
| 117 'DEPRECATED_MIXIN_FUNCTION', | |
| 118 "Mixing in 'Function' is deprecated.", | |
| 119 "Try removing 'Function' from the 'with' clause."); | |
| 120 | |
| 121 /** | |
| 122 * Hint to use the ~/ operator. | 98 * Hint to use the ~/ operator. |
| 123 */ | 99 */ |
| 124 static const HintCode DIVISION_OPTIMIZATION = const HintCode( | 100 static const HintCode DIVISION_OPTIMIZATION = const HintCode( |
| 125 'DIVISION_OPTIMIZATION', | 101 'DIVISION_OPTIMIZATION', |
| 126 "The operator x ~/ y is more efficient than (x / y).toInt().", | 102 "The operator x ~/ y is more efficient than (x / y).toInt().", |
| 127 "Try re-writing the expression to use the '~/' operator."); | 103 "Try re-writing the expression to use the '~/' operator."); |
| 128 | 104 |
| 129 /** | 105 /** |
| 130 * Duplicate imports. | 106 * Duplicate imports. |
| 131 */ | 107 */ |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 */ | 612 */ |
| 637 const HintCode(String name, String message, [String correction]) | 613 const HintCode(String name, String message, [String correction]) |
| 638 : super(name, message, correction); | 614 : super(name, message, correction); |
| 639 | 615 |
| 640 @override | 616 @override |
| 641 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; | 617 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; |
| 642 | 618 |
| 643 @override | 619 @override |
| 644 ErrorType get type => ErrorType.HINT; | 620 ErrorType get type => ErrorType.HINT; |
| 645 } | 621 } |
| OLD | NEW |