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

Unified Diff: pkg/analyzer_cli/lib/src/options.dart

Issue 2809793004: CLI support for `enableAssertInitializer`s. (Closed)
Patch Set: options fix Created 3 years, 8 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_cli/lib/src/driver.dart ('k') | pkg/analyzer_cli/test/data/file_with_assert_initializers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/options.dart
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
index afe83f5582954e70d39f5d6a195b40e52b71366f..338aceeef39ef92c50c737da50280113427c020e 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -36,6 +36,10 @@ typedef void ExitHandler(int code);
class CommandLineOptions {
final bool enableNewAnalysisDriver = true;
+ /// Return `true` if the parser is to parse asserts in the initializer list of
+ /// a constructor.
+ final bool enableAssertInitializer;
+
/// The path to output analysis results when in build mode.
final String buildAnalysisOutput;
@@ -170,6 +174,7 @@ class CommandLineOptions {
disableHints = args['no-hints'],
displayVersion = args['version'],
enableTypeChecks = args['enable_type_checks'],
+ enableAssertInitializer = args['enable-assert-initializers'],
hintsAreFatal = args['fatal-hints'],
ignoreUnrecognizedFlags = args['ignore-unrecognized-flags'],
lints = args[lintsFlag],
@@ -468,6 +473,11 @@ class CommandLineOptions {
defaultsTo: false,
negatable: false,
hide: hide)
+ ..addFlag('enable-assert-initializers',
+ help: 'Enable parsing of asserts in constructor initializers.',
+ defaultsTo: false,
+ negatable: false,
+ hide: hide)
..addFlag('use-analysis-driver-memory-byte-store',
help: 'Use memory byte store, not the file system cache.',
defaultsTo: false,
« no previous file with comments | « pkg/analyzer_cli/lib/src/driver.dart ('k') | pkg/analyzer_cli/test/data/file_with_assert_initializers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698