Skip to content

Commit

Permalink
Add explanation of fixable in --statistics command (#13774)
Browse files Browse the repository at this point in the history
Co-authored-by: Micha Reiser <micha@reiser.io>
  • Loading branch information
sbrugman and MichaReiser authored Oct 17, 2024
1 parent 4ea4bbb commit 6b7a738
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/ruff/src/printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,10 @@ impl Printer {
statistic.name,
)?;
}

if any_fixable {
writeln!(writer, "[*] fixable with `ruff check --fix`",)?;
}
return Ok(());
}
OutputFormat::Json => {
Expand Down
1 change: 1 addition & 0 deletions crates/ruff/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,7 @@ fn show_statistics() {
exit_code: 1
----- stdout -----
1 F401 [*] unused-import
[*] fixable with `ruff check --fix`
----- stderr -----
"###);
Expand Down

0 comments on commit 6b7a738

Please sign in to comment.