Skip to content

Commit 56e1952

Browse files
committed
rust: add ruff check --fix to formatting steps
1 parent 5166b5e commit 56e1952

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: src/util.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ pub(crate) fn run_formatter(path: &Utf8Path) {
2424

2525
let formatter_tasks: &[(&str, &[&str])] = {
2626
match file_ext {
27-
"py" => &[("ruff", ["format"].as_slice())],
27+
"py" => &[
28+
// fixme: the ordering of the commands is important, maybe ensure the order in a more robust way
29+
("ruff", ["check", "--fix"].as_slice()),
30+
("ruff", ["format"].as_slice()),
31+
],
2832
"rs" => &[("rustfmt", ["+nightly", "--edition", "2021"].as_slice())],
2933
"go" => &[("gofmt", ["-w"].as_slice())],
3034
"kt" => &[("ktfmt", ["--kotlinlang-style"].as_slice())],

0 commit comments

Comments
 (0)