Skip to content

Commit 8746d91

Browse files
wakumo-aiclaude
andcommitted
pre-commit: run coverage after checks
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent a6d0a64 commit 8746d91

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

.githooks/pre-commit

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
11
#!/bin/sh
22
set -e
33

4-
echo "[pre-commit] Running checks: uv run make check"
4+
echo "[pre-commit] Running checks (prefer uv)..."
55
if command -v uv >/dev/null 2>&1; then
6+
echo "[pre-commit] using uv to run make check"
67
uv run make check || { echo "[pre-commit] uv run make check failed"; exit 1; }
78
else
8-
echo "[pre-commit] command uv not found. Falling back to make check (if available)."
9+
echo "[pre-commit] uv not found; falling back to make check"
910
if command -v make >/dev/null 2>&1; then
1011
make check || { echo "[pre-commit] make check failed"; exit 1; }
1112
else
12-
echo "[pre-commit] neither uv nor make are available; cannot run checks"; exit 1
13+
echo "[pre-commit] neither uv nor make available to run checks"; exit 1
14+
fi
15+
fi
16+
17+
echo "[pre-commit] Running coverage (prefer uv)..."
18+
if command -v uv >/dev/null 2>&1; then
19+
echo "[pre-commit] using uv to run make coverage"
20+
uv run make coverage || { echo "[pre-commit] uv run make coverage failed"; exit 1; }
21+
else
22+
echo "[pre-commit] uv not found; falling back to make coverage"
23+
if command -v make >/dev/null 2>&1; then
24+
make coverage || { echo "[pre-commit] make coverage failed"; exit 1; }
25+
else
26+
echo "[pre-commit] neither uv nor make available to run coverage"; exit 1
1327
fi
1428
fi
1529

0 commit comments

Comments
 (0)