Skip to content

Commit

Permalink
devops: Also lint tests in pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Sword-Smith committed Aug 6, 2024
1 parent 340fb9c commit 4088889
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .cargo-husky/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
#
# This hook was defined by sword-smith <thor@neptune.cash>
# It's intended to be copied to `.git/hooks/` by `cargo-husky`.

set -e

echo '+cargo clippy --all-targets -- -D warnings'
cargo clippy --all-targets -- -D warnings
echo '+cargo fmt --all -- --check'
cargo fmt --all -- --check
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ blake3 = "1.5.1"
divan = "0.1.14"

[dev-dependencies.cargo-husky]
default-features = false
features = ["precommit-hook", "run-cargo-clippy", "run-cargo-fmt"]
version = "1"
default-features = false
features = ["user-hooks"]

# needed because it otherwise takes too long to sign transaction with STARK proofs
[profile.dev.package.triton-vm]
Expand Down

0 comments on commit 4088889

Please sign in to comment.