| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 * directory. | 155 * directory. |
| 156 */ | 156 */ |
| 157 static const HintCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE = | 157 static const HintCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE = |
| 158 const HintCode( | 158 const HintCode( |
| 159 'FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', | 159 'FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', |
| 160 "A file outside the 'lib' directory shouldn't reference a file " | 160 "A file outside the 'lib' directory shouldn't reference a file " |
| 161 "inside the 'lib' directory using a relative path.", | 161 "inside the 'lib' directory using a relative path.", |
| 162 "Try using a package: URI instead."); | 162 "Try using a package: URI instead."); |
| 163 | 163 |
| 164 /** | 164 /** |
| 165 * Generic type comments (`/*<T>*/` and `/*=T*/`) are no longer necessary and |
| 166 * will soon be ignored. |
| 167 */ |
| 168 static const HintCode GENERIC_METHOD_COMMENT = const HintCode( |
| 169 'GENERIC_METHOD_COMMENT', |
| 170 "The generic type comment is being deprecated in favor of the real syntax.
", |
| 171 "Try replacing the comment with the actual type annotation."); |
| 172 |
| 173 /** |
| 165 * Deferred libraries shouldn't define a top level function 'loadLibrary'. | 174 * Deferred libraries shouldn't define a top level function 'loadLibrary'. |
| 166 */ | 175 */ |
| 167 static const HintCode IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION = | 176 static const HintCode IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION = |
| 168 const HintCode( | 177 const HintCode( |
| 169 'IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION', | 178 'IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION', |
| 170 "The library '{0}' defines a top-level function named 'loadLibrary' " | 179 "The library '{0}' defines a top-level function named 'loadLibrary' " |
| 171 "which is hidden by deferring this library.", | 180 "which is hidden by deferring this library.", |
| 172 "Try changing the import to not be deferred, or " | 181 "Try changing the import to not be deferred, or " |
| 173 "rename the function in the imported library."); | 182 "rename the function in the imported library."); |
| 174 | 183 |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 */ | 673 */ |
| 665 const HintCode(String name, String message, [String correction]) | 674 const HintCode(String name, String message, [String correction]) |
| 666 : super(name, message, correction); | 675 : super(name, message, correction); |
| 667 | 676 |
| 668 @override | 677 @override |
| 669 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; | 678 ErrorSeverity get errorSeverity => ErrorType.HINT.severity; |
| 670 | 679 |
| 671 @override | 680 @override |
| 672 ErrorType get type => ErrorType.HINT; | 681 ErrorType get type => ErrorType.HINT; |
| 673 } | 682 } |
| OLD | NEW |