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

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

Issue 2502233004: report errors in included options files (Closed)
Patch Set: merge Created 4 years, 1 month 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/source/analysis_options_provider.dart ('k') | 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/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 4b39a4515d3954822c73e4fb1259c0204a79049d..768ec94e73b25b9bc4d21a77c30e301b7aec28f8 100644
--- a/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
+++ b/pkg/analyzer/lib/src/analysis_options/error/option_codes.dart
@@ -23,6 +23,19 @@ class AnalysisOptionsErrorCode extends ErrorCode {
const AnalysisOptionsErrorCode('PARSE_ERROR', '{0}');
/**
+ * An error code indicating that there is a syntactic error
+ * in the included 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
+ */
+ static const INCLUDED_FILE_PARSE_ERROR = const AnalysisOptionsErrorCode(
+ 'INCLUDED_FILE_PARSE_ERROR', '{3} in {0}({1}..{2})');
+
+ /**
* Initialize a newly created error code to have the given [name].
*/
const AnalysisOptionsErrorCode(String name, String message,
@@ -44,6 +57,30 @@ class AnalysisOptionsErrorCode extends ErrorCode {
*/
class AnalysisOptionsWarningCode extends ErrorCode {
/**
+ * An error code indicating a specified include file could not be found.
+ *
+ * Parameters:
+ * 0: the uri of the file to be included
+ * 1: the path of the file containing the include directive
+ */
+ static const AnalysisOptionsWarningCode INCLUDE_FILE_NOT_FOUND =
+ const AnalysisOptionsWarningCode('INCLUDE_FILE_NOT_FOUND',
+ "The include file {0} in {1} cannot be found.");
+
+ /**
+ * An error code indicating a specified include file has a warning.
+ *
+ * Parameters:
+ * 0: the path of the file containing the warnings
+ * 1: the starting offset of the text in the file that contains the warning
+ * 2: the ending offset of the text in the file that contains the warning
+ * 3: the warning message
+ */
+ static const AnalysisOptionsWarningCode INCLUDED_FILE_WARNING =
+ const AnalysisOptionsWarningCode('INCLUDED_FILE_WARNING',
+ "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.
*
« no previous file with comments | « pkg/analyzer/lib/source/analysis_options_provider.dart ('k') | pkg/analyzer/lib/src/task/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698