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

Unified Diff: pkg/analyzer/lib/src/task/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/lib/src/task/dart.dart ('k') | pkg/analyzer/lib/src/task/strong/checker.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 c761f7680bfe7c4ce9771b4fb084ca9be27293fd..ccae7d61a3b80958d74e322a0c40611bebf580ee 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -58,6 +58,7 @@ class AnalyzerOptions {
static const String strong_mode = 'strong-mode';
// Strong mode options, see AnalysisOptionsImpl for documentation.
+ static const String declarationCasts = 'declaration-casts';
static const String implicitCasts = 'implicit-casts';
static const String implicitDynamic = 'implicit-dynamic';
@@ -573,6 +574,9 @@ class _OptionsProcessor {
AnalysisOptionsImpl options, Object feature, Object value) {
bool boolValue = toBool(value);
if (boolValue != null) {
+ if (feature == AnalyzerOptions.declarationCasts) {
+ options.declarationCasts = boolValue;
+ }
if (feature == AnalyzerOptions.implicitCasts) {
options.implicitCasts = boolValue;
}
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/lib/src/task/strong/checker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698