justfile: Add `--check` to `cargo fmt`
Since these are run as checks, the `--check` flag should be run. This ensures that the `pre-commit` and `pre-push` checks fail if there is any formatting. Contributors are expected to have formatting in their IDEs or can run `cargo fmt` if they wish to format the Rust files.
This commit is contained in:
parent
998ff91e2c
commit
067a9d13bf
2
justfile
2
justfile
|
|
@ -36,7 +36,7 @@ pre-commit: check-conflict-markers format-rust check-rust check-docs check-typos
|
|||
[parallel]
|
||||
format-rust: (verify-tool "cargo")
|
||||
@echo "{{CHECK}}Cargo fmt...{{NORMAL}}"
|
||||
@{{cargo_cmd}} fmt --all
|
||||
@{{cargo_cmd}} fmt --all --check
|
||||
|
||||
# Run cargo check
|
||||
[group('pre-commit')]
|
||||
|
|
|
|||
Loading…
Reference in New Issue