Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: pkg/analyzer/lib/src/analysis_options/error/option_codes.dart

Issue 2993323002: Add a hint to rename .analysis_options files. (Closed)
Patch Set: and hint to global list Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/dart/analysis/driver.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/dart/analysis/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698