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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
diff --git a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
index ba774abde4e0c60af5c2b5c79419a85d3311d251..f7cc9755cbf717dd76d1ac17885fbda2e4eb0c76 100644
--- a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
+++ b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
@@ -150,3 +150,31 @@ class AnalysisOptionsWarningCode extends ErrorCode {
@override
ErrorType get type => ErrorType.STATIC_WARNING;
}
+
+class AnalysisOptionsHintCode extends ErrorCode {
+ /**
+ * An error code indicating the analysis options file name is deprecated and
+ * the file should be renamed.
+ *
+ * Parameters:
+ * 0: the uri of the file which should be renamed
+ */
+ static const ErrorCode DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME =
+ const AnalysisOptionsHintCode(
+ 'DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME',
+ "The name of the analysis options file {0} is deprecated;"
+ " consider renaming it to analysis_options.yaml.");
+
+ /**
+ * Initialize a newly created hint code to have the given [name].
+ */
+ const AnalysisOptionsHintCode(String name, String message,
+ [String correction])
+ : super(name, message, correction);
+
+ @override
+ ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
+
+ @override
+ ErrorType get type => ErrorType.HINT;
+}
« 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