| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
set -euo pipefail |
| 11 |
|
| 12 |
ROOT="$(git rev-parse --show-toplevel)" |
| 13 |
cd "$ROOT" |
| 14 |
|
| 15 |
echo "pre-commit: rustfmt..." |
| 16 |
if ! bash scripts/githooks/rustfmt-gate.sh; then |
| 17 |
echo "pre-commit: rustfmt gate failed, commit aborted (use --no-verify to bypass)." |
| 18 |
exit 1 |
| 19 |
fi |
| 20 |
|
| 21 |
echo "pre-commit: frontend lint..." |
| 22 |
if ! bash scripts/lint-frontend.sh; then |
| 23 |
echo "pre-commit: lint failed, commit aborted (use --no-verify to bypass)." |
| 24 |
exit 1 |
| 25 |
fi |
| 26 |
|
| 27 |
echo "pre-commit: JS tests..." |
| 28 |
if ! node src-tauri/frontend/js/tests/run.js; then |
| 29 |
echo "pre-commit: JS tests failed, commit aborted (use --no-verify to bypass)." |
| 30 |
exit 1 |
| 31 |
fi |
| 32 |
|
| 33 |
echo "pre-commit: clean." |
| 34 |
|