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.analysis_options.error.option_codes; | 5 library analyzer.src.analysis_options.error.option_codes; |
6 | 6 |
7 import 'package:analyzer/error/error.dart'; | 7 import 'package:analyzer/error/error.dart'; |
8 | 8 |
9 /** | 9 /** |
10 * The error codes used for errors in analysis options files. The convention for | 10 * The error codes used for errors in analysis options files. The convention for |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 } | 50 } |
51 | 51 |
52 /** | 52 /** |
53 * The error codes used for warnings in analysis options files. The convention | 53 * The error codes used for warnings in analysis options files. The convention |
54 * for this class is for the name of the error code to indicate the problem that | 54 * for this class is for the name of the error code to indicate the problem that |
55 * caused the error to be generated and for the error message to explain what is | 55 * caused the error to be generated and for the error message to explain what is |
56 * wrong and, when appropriate, how the problem can be corrected. | 56 * wrong and, when appropriate, how the problem can be corrected. |
57 */ | 57 */ |
58 class AnalysisOptionsWarningCode extends ErrorCode { | 58 class AnalysisOptionsWarningCode extends ErrorCode { |
59 /** | 59 /** |
| 60 * An error code indicating the analysis options file name is deprecated |
| 61 * and the file should be renamed. |
| 62 * |
| 63 * Parameters: |
| 64 * 0: the uri of the file which should be renamed |
| 65 */ |
| 66 static const ErrorCode DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME = |
| 67 const AnalysisOptionsWarningCode( |
| 68 'DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME', |
| 69 "The name of the analysis options file {0} is deprecated." |
| 70 " Consider renaming the file to analysis_options.yaml"); |
| 71 |
| 72 /** |
60 * An error code indicating a specified include file could not be found. | 73 * An error code indicating a specified include file could not be found. |
61 * | 74 * |
62 * Parameters: | 75 * Parameters: |
63 * 0: the uri of the file to be included | 76 * 0: the uri of the file to be included |
64 * 1: the path of the file containing the include directive | 77 * 1: the path of the file containing the include directive |
65 */ | 78 */ |
66 static const AnalysisOptionsWarningCode INCLUDE_FILE_NOT_FOUND = | 79 static const AnalysisOptionsWarningCode INCLUDE_FILE_NOT_FOUND = |
67 const AnalysisOptionsWarningCode('INCLUDE_FILE_NOT_FOUND', | 80 const AnalysisOptionsWarningCode('INCLUDE_FILE_NOT_FOUND', |
68 "The include file {0} in {1} cannot be found."); | 81 "The include file {0} in {1} cannot be found."); |
69 | 82 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 const AnalysisOptionsWarningCode(String name, String message, | 155 const AnalysisOptionsWarningCode(String name, String message, |
143 [String correction]) | 156 [String correction]) |
144 : super(name, message, correction); | 157 : super(name, message, correction); |
145 | 158 |
146 @override | 159 @override |
147 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; | 160 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; |
148 | 161 |
149 @override | 162 @override |
150 ErrorType get type => ErrorType.STATIC_WARNING; | 163 ErrorType get type => ErrorType.STATIC_WARNING; |
151 } | 164 } |
OLD | NEW |