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

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

Issue 2992243002: Add a test to ensure that error codes are not being missed and add missed error codes (Closed)
Patch Set: 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/error/codes.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 768ec94e73b25b9bc4d21a77c30e301b7aec28f8..ba774abde4e0c60af5c2b5c79419a85d3311d251 100644
--- a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
+++ b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
@@ -14,26 +14,27 @@ import 'package:analyzer/error/error.dart';
*/
class AnalysisOptionsErrorCode extends ErrorCode {
/**
- * An error code indicating that there is a syntactic error in the file.
+ * An error code indicating that there is a syntactic error in the included
+ * file.
*
* Parameters:
- * 0: the error message from the parse error
+ * 0: the path of the file containing the error
+ * 1: the starting offset of the text in the file that contains the error
+ * 2: the ending offset of the text in the file that contains the error
+ * 3: the error message
*/
- static const AnalysisOptionsErrorCode PARSE_ERROR =
- const AnalysisOptionsErrorCode('PARSE_ERROR', '{0}');
+ static const AnalysisOptionsErrorCode INCLUDED_FILE_PARSE_ERROR =
+ const AnalysisOptionsErrorCode(
+ 'INCLUDED_FILE_PARSE_ERROR', '{3} in {0}({1}..{2})');
/**
- * An error code indicating that there is a syntactic error
- * in the included file.
+ * An error code indicating that there is a syntactic error in the file.
*
* Parameters:
- * 0: the path of the file containing the error
- * 1: the starting offset of the text in the file that contains the error
- * 2: the ending offset of the text in the file that contains the error
- * 3: the error message
+ * 0: the error message from the parse error
*/
- static const INCLUDED_FILE_PARSE_ERROR = const AnalysisOptionsErrorCode(
- 'INCLUDED_FILE_PARSE_ERROR', '{3} in {0}({1}..{2})');
+ static const AnalysisOptionsErrorCode PARSE_ERROR =
+ const AnalysisOptionsErrorCode('PARSE_ERROR', '{0}');
/**
* Initialize a newly created error code to have the given [name].
@@ -81,19 +82,15 @@ class AnalysisOptionsWarningCode extends ErrorCode {
"Warning in the included options file {0}({1}..{2}): {3}");
/**
- * An error code indicating that a plugin is being configured with an
- * unsupported option and legal options are provided.
+ * An error code indicating that an unrecognized error code is being used to
+ * specify an error filter.
*
* Parameters:
- * 0: the plugin name
- * 1: the unsupported option key
- * 2: legal values
+ * 0: the unrecognized error code
*/
- static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUES =
+ static const AnalysisOptionsWarningCode UNRECOGNIZED_ERROR_CODE =
const AnalysisOptionsWarningCode(
- 'UNSUPPORTED_OPTION_WITH_LEGAL_VALUES',
- "The option '{1}' isn't supported by '{0}'.",
- "Try using one of the supported options: {2}.");
+ 'UNRECOGNIZED_ERROR_CODE', "'{0}' isn't a recognized error code.");
/**
* An error code indicating that a plugin is being configured with an
@@ -111,6 +108,21 @@ class AnalysisOptionsWarningCode extends ErrorCode {
"Try using the only supported option: '{2}'.");
/**
+ * An error code indicating that a plugin is being configured with an
+ * unsupported option and legal options are provided.
+ *
+ * Parameters:
+ * 0: the plugin name
+ * 1: the unsupported option key
+ * 2: legal values
+ */
+ static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUES =
+ const AnalysisOptionsWarningCode(
+ 'UNSUPPORTED_OPTION_WITH_LEGAL_VALUES',
+ "The option '{1}' isn't supported by '{0}'.",
+ "Try using one of the supported options: {2}.");
+
+ /**
* An error code indicating that an option entry is being configured with an
* unsupported value.
*
@@ -126,17 +138,6 @@ class AnalysisOptionsWarningCode extends ErrorCode {
"Try using one of the supported options: {2}.");
/**
- * An error code indicating that an unrecognized error code is being used to
- * specify an error filter.
- *
- * Parameters:
- * 0: the unrecognized error code
- */
- static const AnalysisOptionsWarningCode UNRECOGNIZED_ERROR_CODE =
- const AnalysisOptionsWarningCode(
- 'UNRECOGNIZED_ERROR_CODE', "'{0}' isn't a recognized error code.");
-
- /**
* Initialize a newly created warning code to have the given [name].
*/
const AnalysisOptionsWarningCode(String name, String message,
« no previous file with comments | « pkg/analyzer/lib/error/error.dart ('k') | pkg/analyzer/lib/src/error/codes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698