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 /** | |
73 * An error code indicating a specified include file could not be found. | 60 * An error code indicating a specified include file could not be found. |
74 * | 61 * |
75 * Parameters: | 62 * Parameters: |
76 * 0: the uri of the file to be included | 63 * 0: the uri of the file to be included |
77 * 1: the path of the file containing the include directive | 64 * 1: the path of the file containing the include directive |
78 */ | 65 */ |
79 static const AnalysisOptionsWarningCode INCLUDE_FILE_NOT_FOUND = | 66 static const AnalysisOptionsWarningCode INCLUDE_FILE_NOT_FOUND = |
80 const AnalysisOptionsWarningCode('INCLUDE_FILE_NOT_FOUND', | 67 const AnalysisOptionsWarningCode('INCLUDE_FILE_NOT_FOUND', |
81 "The include file {0} in {1} cannot be found."); | 68 "The include file {0} in {1} cannot be found."); |
82 | 69 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 const AnalysisOptionsWarningCode(String name, String message, | 142 const AnalysisOptionsWarningCode(String name, String message, |
156 [String correction]) | 143 [String correction]) |
157 : super(name, message, correction); | 144 : super(name, message, correction); |
158 | 145 |
159 @override | 146 @override |
160 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; | 147 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; |
161 | 148 |
162 @override | 149 @override |
163 ErrorType get type => ErrorType.STATIC_WARNING; | 150 ErrorType get type => ErrorType.STATIC_WARNING; |
164 } | 151 } |
OLD | NEW |