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

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

Issue 2654043003: add warning for deprecated .analysis_options file name (Closed)
Patch Set: merge Created 3 years, 11 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 | « no previous file | pkg/analyzer/lib/src/task/options.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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698