Wire frontendCoverage (Vitest 70%/60%/70%) into the check task chain instead of plain unit tests so commits fail when line or branch coverage drops. Document thresholds in AGENTS.md and improve pre-commit failure hints. Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
480 B
Bash
Executable file
15 lines
480 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Symlinks scripts/pre-commit-check.sh into .git/hooks/pre-commit
|
|
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
HOOK="$ROOT/.git/hooks/pre-commit"
|
|
CHECK="$ROOT/scripts/pre-commit-check.sh"
|
|
|
|
chmod +x "$CHECK"
|
|
ln -sf "../../scripts/pre-commit-check.sh" "$HOOK"
|
|
chmod +x "$HOOK"
|
|
|
|
echo "Installed pre-commit hook -> scripts/pre-commit-check.sh"
|
|
echo "Every commit will run: ./gradlew check (includes line/branch coverage thresholds)"
|