@@ -40,9 +40,9 @@ class FormatCli extends TaskCli {
4040
4141 Future <CliResult > run (ArgResults parsedArgs) async {
4242 try {
43- if (! platform_util
44- . hasImmediateDependency ( 'dart_style' )) return new CliResult .fail (
45- 'Package "dart_style" must be an immediate dependency in order to run its executables.' );
43+ if (! platform_util. hasImmediateDependency ( 'dart_style' ))
44+ return new CliResult .fail (
45+ 'Package "dart_style" must be an immediate dependency in order to run its executables.' );
4646 } catch (e) {
4747 // It's possible that this check may throw if the pubspec.yaml
4848 // could not be found or if the yaml could not be parsed.
@@ -77,18 +77,20 @@ class FormatCli extends TaskCli {
7777 }
7878
7979 if (task.isDryRun) {
80- if (task.successful) return new CliResult .success (
81- excludedFilesWarning + 'Your Dart code is good to go!' );
82- if (task.affectedFiles.isEmpty) return new CliResult .fail (
83- excludedFilesWarning + 'The Dart formatter needs to be run.' );
80+ if (task.successful)
81+ return new CliResult .success (
82+ excludedFilesWarning + 'Your Dart code is good to go!' );
83+ if (task.affectedFiles.isEmpty)
84+ return new CliResult .fail (
85+ excludedFilesWarning + 'The Dart formatter needs to be run.' );
8486 return new CliResult .fail (excludedFilesWarning +
8587 'The Dart formatter needs to be run. The following files require changes:\n ' +
8688 task.affectedFiles.join ('\n ' ));
8789 } else {
8890 if (! task.successful) return new CliResult .fail ('Dart formatter failed.' );
89- if (task.affectedFiles.isEmpty) return new CliResult . success (
90- excludedFilesWarning +
91- 'Success! All files are already formatted correctly.' );
91+ if (task.affectedFiles.isEmpty)
92+ return new CliResult . success ( excludedFilesWarning +
93+ 'Success! All files are already formatted correctly.' );
9294 return new CliResult .success (excludedFilesWarning +
9395 'Success! The following files were formatted:\n ' +
9496 task.affectedFiles.join ('\n ' ));
0 commit comments