We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7af312 commit df35a9fCopy full SHA for df35a9f
1 file changed
.githooks/pre-push
@@ -0,0 +1,20 @@
1
+#!/usr/bin/env bash
2
+set -euo pipefail
3
+
4
+echo ">>> [pre-push] Running cargo fmt --check..."
5
+if ! cargo fmt --all -- --check; then
6
+ echo ""
7
+ echo "HOOK FAILED: cargo fmt check failed."
8
+ echo "LLM FIX: run 'cargo fmt --all' then re-attempt the push."
9
+ exit 1
10
+fi
11
12
+echo ">>> [pre-push] Running cargo clippy..."
13
+if ! cargo clippy --all-targets --all-features -- -D warnings; then
14
15
+ echo "HOOK FAILED: cargo clippy reported warnings or errors."
16
+ echo "LLM FIX: fix the clippy diagnostics above, then re-attempt the push."
17
18
19
20
+echo ">>> [pre-push] All checks passed."
0 commit comments