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:
Fintan Halpenny 2026-05-22 09:13:43 +01:00
parent 998ff91e2c
commit 067a9d13bf
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ pre-commit: check-conflict-markers format-rust check-rust check-docs check-typos
[parallel] [parallel]
format-rust: (verify-tool "cargo") format-rust: (verify-tool "cargo")
@echo "{{CHECK}}Cargo fmt...{{NORMAL}}" @echo "{{CHECK}}Cargo fmt...{{NORMAL}}"
@{{cargo_cmd}} fmt --all @{{cargo_cmd}} fmt --all --check
# Run cargo check # Run cargo check
[group('pre-commit')] [group('pre-commit')]