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

Unified Diff: pkg/analyzer/lib/src/command_line/arguments.dart

Issue 2726783002: echo analysis options information if dartanalyzer --verbose is specified (Closed)
Patch Set: merge Created 3 years, 10 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 | « no previous file | pkg/analyzer/lib/src/context/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/command_line/arguments.dart
diff --git a/pkg/analyzer/lib/src/command_line/arguments.dart b/pkg/analyzer/lib/src/command_line/arguments.dart
index e0ab6761474ece69175ff18563183d37de7b8880..5579005fc7999454e43c73bedd121377bd69c18e 100644
--- a/pkg/analyzer/lib/src/command_line/arguments.dart
+++ b/pkg/analyzer/lib/src/command_line/arguments.dart
@@ -32,25 +32,38 @@ const String strongModeFlag = 'strong';
/**
* Update [options] with the value of each analysis option command line flag.
*/
-void applyAnalysisOptionFlags(AnalysisOptionsImpl options, ArgResults args) {
+void applyAnalysisOptionFlags(AnalysisOptionsImpl options, ArgResults args,
+ {void verbosePrint(String text)}) {
+ void verbose(String text) {
+ if (verbosePrint != null) {
+ verbosePrint('Analysis options: $text');
+ }
+ }
+
if (args.wasParsed(enableStrictCallChecksFlag)) {
options.enableStrictCallChecks = args[enableStrictCallChecksFlag];
+ verbose('$enableStrictCallChecksFlag = ${options.enableStrictCallChecks}');
}
if (args.wasParsed(enableSuperMixinFlag)) {
options.enableSuperMixins = args[enableSuperMixinFlag];
+ verbose('$enableSuperMixinFlag = ${options.enableSuperMixins}');
}
if (args.wasParsed(noImplicitCastsFlag)) {
options.implicitCasts = !args[noImplicitCastsFlag];
+ verbose('$noImplicitCastsFlag = ${options.implicitCasts}');
}
if (args.wasParsed(noImplicitDynamicFlag)) {
options.implicitDynamic = !args[noImplicitDynamicFlag];
+ verbose('$noImplicitDynamicFlag = ${options.implicitDynamic}');
}
if (args.wasParsed(strongModeFlag)) {
options.strongMode = args[strongModeFlag];
+ verbose('$strongModeFlag = ${options.strongMode}');
}
try {
if (args.wasParsed(lintsFlag)) {
options.lint = args[lintsFlag];
+ verbose('$lintsFlag = ${options.lint}');
}
} on ArgumentError {
// lints were not defined - ignore and fall through
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698