mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:55:08 +00:00
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:
parent
fc47e0dab2
commit
1439bb592e
3 changed files with 133 additions and 25 deletions
|
@ -148,13 +148,13 @@ quoting the executed command, along with the relevant file contents and `pyproje
|
|||
shell.generate(&mut Args::command(), &mut stdout());
|
||||
}
|
||||
Command::Check(args) => return check(args, log_level),
|
||||
Command::Format(args) => return format(args),
|
||||
Command::Format(args) => return format(args, log_level),
|
||||
}
|
||||
|
||||
Ok(ExitStatus::Success)
|
||||
}
|
||||
|
||||
fn format(args: FormatCommand) -> Result<ExitStatus> {
|
||||
fn format(args: FormatCommand, log_level: LogLevel) -> Result<ExitStatus> {
|
||||
warn_user_once!(
|
||||
"`ruff format` is a work-in-progress, subject to change at any time, and intended only for \
|
||||
experimentation."
|
||||
|
@ -173,7 +173,7 @@ fn format(args: FormatCommand) -> Result<ExitStatus> {
|
|||
stdout().lock().write_all(formatted.as_code().as_bytes())?;
|
||||
Ok(ExitStatus::Success)
|
||||
} else {
|
||||
commands::format::format(&cli, &overrides)
|
||||
commands::format::format(&cli, &overrides, log_level)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue