| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 const AnalysisOptionsWarningCode(String name, String message, | 143 const AnalysisOptionsWarningCode(String name, String message, |
| 144 [String correction]) | 144 [String correction]) |
| 145 : super(name, message, correction); | 145 : super(name, message, correction); |
| 146 | 146 |
| 147 @override | 147 @override |
| 148 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; | 148 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; |
| 149 | 149 |
| 150 @override | 150 @override |
| 151 ErrorType get type => ErrorType.STATIC_WARNING; | 151 ErrorType get type => ErrorType.STATIC_WARNING; |
| 152 } | 152 } |
| 153 |
| 154 class AnalysisOptionsHintCode extends ErrorCode { |
| 155 /** |
| 156 * An error code indicating the analysis options file name is deprecated and |
| 157 * the file should be renamed. |
| 158 * |
| 159 * Parameters: |
| 160 * 0: the uri of the file which should be renamed |
| 161 */ |
| 162 static const ErrorCode DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME = |
| 163 const AnalysisOptionsHintCode( |
| 164 'DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME', |
| 165 "The name of the analysis options file {0} is deprecated;" |
| 166 " consider renaming it to analysis_options.yaml."); |
| 167 |
| 168 /** |
| 169 * Initialize a newly created hint code to have the given [name]. |
| 170 */ |
| 171 const AnalysisOptionsHintCode(String name, String message, |
| 172 [String correction]) |
| 173 : super(name, message, correction); |
| 174 |
| 175 @override |
| 176 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 177 |
| 178 @override |
| 179 ErrorType get type => ErrorType.HINT; |
| 180 } |
| OLD | NEW |