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

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

Issue 2976963002: Add --no-declaration-casts option to analyzer. (Closed)
Patch Set: Fix comment Created 3 years, 5 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/test/src/task/strong/strong_test_helper.dart ('k') | no next file » | 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 c7a64921da0119c2063846c82ce301e6e8cf9bdc..fdf70f550b99e4684194f437e071a629fc9c5256 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -39,6 +39,9 @@ class CommandLineOptions {
/// a constructor.
final bool enableAssertInitializer;
+ /// Whether declaration casts are enabled (in strong mode)
+ final bool declarationCasts;
+
/// The path to output analysis results when in build mode.
final String buildAnalysisOutput;
@@ -170,6 +173,9 @@ class CommandLineOptions {
contextBuilderOptions = createContextBuilderOptions(args),
dartSdkPath = args['dart-sdk'],
dartSdkSummaryPath = args['dart-sdk-summary'],
+ declarationCasts = args.wasParsed(declarationCastsFlag)
+ ? args[declarationCastsFlag]
+ : args[implicitCastsFlag],
disableCacheFlushing = args['disable-cache-flushing'],
disableHints = args['no-hints'],
displayVersion = args['version'],
@@ -191,7 +197,7 @@ class CommandLineOptions {
warningsAreFatal = args['fatal-warnings'],
lintsAreFatal = args['fatal-lints'],
strongMode = args['strong'],
- implicitCasts = !args['no-implicit-casts'],
+ implicitCasts = args[implicitCastsFlag],
implicitDynamic = !args['no-implicit-dynamic'],
useAnalysisDriverMemoryByteStore =
args['use-analysis-driver-memory-byte-store'],
« no previous file with comments | « pkg/analyzer/test/src/task/strong/strong_test_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698