From d6b4759fee4b849cd105fe7886ec0e2a2a116b81 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 29 Jan 2016 12:23:56 -0800 Subject: [PATCH] tweak the output for the analyze command --- packages/flutter_tools/lib/src/commands/analyze.dart | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/flutter_tools/lib/src/commands/analyze.dart b/packages/flutter_tools/lib/src/commands/analyze.dart index 240cbe445f..7dbe03832a 100644 --- a/packages/flutter_tools/lib/src/commands/analyze.dart +++ b/packages/flutter_tools/lib/src/commands/analyze.dart @@ -18,12 +18,13 @@ import '../runner/flutter_command.dart'; class AnalyzeCommand extends FlutterCommand { String get name => 'analyze'; - String get description => 'Runs a carefully configured dartanalyzer over the current project\'s dart code.'; + String get description => 'Runs a carefully configured dartanalyzer over the current project\'s Dart code.'; AnalyzeCommand() { argParser.addFlag('flutter-repo', help: 'Include all the examples and tests from the Flutter repository.', defaultsTo: false); argParser.addFlag('current-directory', help: 'Include all the Dart files in the current directory, if any.', defaultsTo: true); argParser.addFlag('current-package', help: 'Include the lib/main.dart file from the current directory, if any.', defaultsTo: true); + argParser.addFlag('preamble', help: 'Display the number of files that will be analyzed.', defaultsTo: true); argParser.addFlag('congratulate', help: 'Show output even when there are no errors, warnings, hints, or lints.', defaultsTo: true); } @@ -256,7 +257,14 @@ class AnalyzeCommand extends FlutterCommand { mainFile.path ]; - printStatus(cmd.join(' ')); + if (argResults['preamble']) { + if (dartFiles.length == 1) { + printStatus('Analyzing ${dartFiles.first}...'); + } else { + printStatus('Analyzing ${dartFiles.length} files...'); + } + } + Process process = await Process.start( cmd[0], cmd.sublist(1),