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

Unified Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 1418533004: Unsupported analysis option validation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Warning type fix. Created 5 years, 2 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 | « no previous file | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error.dart
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 58474c05b37d6f37e5536fac2fa7eb3d3f9d7790..6b4d93efa9fd29bb73c54fd50c96a0b787efdb32 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -294,10 +294,7 @@ class AnalysisErrorWithProperties extends AnalysisError {
}
/**
- * The error codes used for errors in analysis options files. The convention for
- * this class is for the name of the error code to indicate the problem that
- * caused the error to be generated and for the error message to explain what is
- * wrong and, when appropriate, how the problem can be corrected.
+ * The error codes used for errors in analysis options files.
*/
class AnalysisOptionsErrorCode extends ErrorCode {
/**
@@ -310,10 +307,7 @@ class AnalysisOptionsErrorCode extends ErrorCode {
const AnalysisOptionsErrorCode('PARSE_ERROR', '{0}');
/**
- * Initialize a newly created error code to have the given [name]. The message
- * associated with the error will be created from the given [message]
- * template. The correction associated with the error will be created from the
- * given [correction] template.
+ * Initialize a newly created error code to have the given [name].
*/
const AnalysisOptionsErrorCode(String name, String message,
[String correction])
@@ -327,6 +321,36 @@ class AnalysisOptionsErrorCode extends ErrorCode {
}
/**
+ * The error codes used for warnings in analysis options files.
+ */
+class AnalysisOptionsWarningCode extends ErrorCode {
+ /**
+ * An error code indicating that a plugin is being configured with an
+ * unsupported option.
+ *
+ * Parameters:
+ * 0: the plugin name
+ * 1: the unsupported option key
+ */
+ static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION =
+ const AnalysisOptionsWarningCode('UNSUPPORTED_OPTION_ERROR',
+ "The option '{1}' is not supported by {0}");
+
+ /**
+ * Initialize a newly created warning code to have the given [name].
+ */
+ const AnalysisOptionsWarningCode(String name, String message,
+ [String correction])
+ : super(name, message, correction);
+
+ @override
+ ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
+
+ @override
+ ErrorType get type => ErrorType.STATIC_WARNING;
+}
+
+/**
* An [AnalysisErrorListener] that keeps track of whether any error has been
* reported to it.
*/
« 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