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 3706464c41c3469e8328a3bd67f4ca88ac8f9c48..030f1bfec653a3fa11b4fbc2ecd796ae27a1538a 100644 |
--- a/pkg/analyzer_cli/lib/src/options.dart |
+++ b/pkg/analyzer_cli/lib/src/options.dart |
@@ -150,6 +150,12 @@ class CommandLineOptions { |
/// Whether to use strong static checking. |
final bool strongMode; |
+ /// Whether implicit casts are enabled (in strong mode) |
+ final bool implicitCasts; |
+ |
+ /// Whether implicit dynamic is enabled (mainly for strong mode users) |
+ final bool implicitDynamic; |
+ |
/// Whether to treat lints as fatal |
final bool lintsAreFatal; |
@@ -197,6 +203,8 @@ class CommandLineOptions { |
sourceFiles = args.rest, |
warningsAreFatal = args['fatal-warnings'], |
strongMode = args['strong'], |
+ implicitCasts = !args['no-implicit-casts'], |
+ implicitDynamic = !args['no-implicit-dynamic'], |
lintsAreFatal = args['fatal-lints']; |
/// Parse [args] into [CommandLineOptions] describing the specified |
@@ -478,7 +486,13 @@ class CommandLineOptions { |
negatable: false, |
hide: true) |
..addFlag('strong', |
- help: 'Enable strong static checks (https://goo.gl/DqcBsw)'); |
+ help: 'Enable strong static checks (https://goo.gl/DqcBsw)') |
+ ..addFlag('no-implicit-casts', |
+ negatable: false, |
+ help: 'Disable implicit casts in strong mode (https://goo.gl/cTLz40)') |
+ ..addFlag('no-implicit-dynamic', |
+ negatable: false, |
+ help: 'Disable implicit dynamic (https://goo.gl/m0UgXD)'); |
try { |
// TODO(scheglov) https://code.google.com/p/dart/issues/detail?id=11061 |