Add cargo fmt to pre-commit githook

To save devs getting frustrated by CI; add a call to `cargo +nightly
fmt` to our git pre-commit hook.
This commit is contained in:
Tobin C. Harding 2022-07-21 10:35:29 +10:00
parent 55312f2972
commit 2d6467f980
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 3 additions and 0 deletions

View File

@ -47,3 +47,6 @@ git diff-index --check --cached $against -- || exit 1
# Check that code lints cleanly. # Check that code lints cleanly.
cargo clippy --all-features -- -D warnings || exit 1 cargo clippy --all-features -- -D warnings || exit 1
# Check that there are no formatting issues.
cargo +nightly fmt --check || exit 1