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

Unified Diff: pkg/analyzer/lib/src/task/options.dart

Issue 1420363005: Error Suppression FTW. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Test 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 | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/options.dart
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index 51a8f9bd53d1daa9d5eaad51bc8528387d22fa9e..8330e86a66e071225c628ba7c7980bdb21536d63 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -23,10 +23,25 @@ final ListResultDescriptor<AnalysisError> ANALYSIS_OPTIONS_ERRORS =
new ListResultDescriptor<AnalysisError>(
'ANALYSIS_OPTIONS_ERRORS', AnalysisError.NO_ERRORS);
+/// `analyzer` analysis options constants.
+class AnalyzerOptions {
+ static const String errors = 'errors';
+ static const String exclude = 'exclude';
+ static const String plugins = 'plugins';
+ static const String strong_mode = 'strong-mode';
+
+ /// Supported top-level `analyzer` options.
+ static const List<String> top_level = const [
+ errors,
+ exclude,
+ plugins,
+ strong_mode
+ ];
+}
+
/// Validates `analyzer` top-level options.
class AnalyzerOptionsValidator extends TopLevelOptionValidator {
- AnalyzerOptionsValidator()
- : super('analyzer', const ['exclude', 'plugins', 'strong-mode']);
+ AnalyzerOptionsValidator() : super('analyzer', AnalyzerOptions.top_level);
}
/// Convenience class for composing validators.
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698