Report number of changed files on the format CLI (#6948)

## Summary

Very basic summary:

<img width="962" alt="Screen Shot 2023-08-28 at 1 17 37 PM"
src="53537aca-7579-44d8-855b-f4553affae50">

If you run with `--verbose`, we'll also show you the timing:

<img width="962" alt="Screen Shot 2023-08-28 at 1 17 58 PM"
src="63cbd13e-9462-4e49-b3a3-c6663a7ad41c">
This commit is contained in:
Charlie Marsh 2023-08-28 18:42:31 -04:00 committed by GitHub
parent fc47e0dab2
commit 1439bb592e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 133 additions and 25 deletions

View file

@ -329,6 +329,9 @@ pub struct CheckCommand {
pub struct FormatCommand {
/// List of files or directories to format.
pub files: Vec<PathBuf>,
/// Specify file to write the linter output to (default: stdout).
#[arg(short, long)]
pub output_file: Option<PathBuf>,
/// The minimum Python version that should be supported.
#[arg(long, value_enum)]
pub target_version: Option<PythonVersion>,
@ -480,6 +483,7 @@ impl FormatCommand {
config: self.config,
files: self.files,
isolated: self.isolated,
output_file: self.output_file,
stdin_filename: self.stdin_filename,
},
Overrides {
@ -540,6 +544,7 @@ pub struct FormatArguments {
pub config: Option<PathBuf>,
pub files: Vec<PathBuf>,
pub isolated: bool,
pub output_file: Option<PathBuf>,
pub stdin_filename: Option<PathBuf>,
}