chore: tighten pre-commit verification
This commit is contained in:
parent
325a4327b9
commit
66d979e543
4
Justfile
4
Justfile
@ -18,7 +18,7 @@ init-env:
|
||||
# Install Git hooks for this repository.
|
||||
install-git-hooks:
|
||||
@mkdir -p .git/hooks
|
||||
@printf '%s\n' '#!/bin/sh' '' 'just test' > .git/hooks/pre-commit
|
||||
@printf '%s\n' '#!/bin/sh' '' 'just check test' > .git/hooks/pre-commit
|
||||
@chmod +x .git/hooks/pre-commit
|
||||
@printf '%s\n' 'Installed .git/hooks/pre-commit'
|
||||
@printf '%s\n' '#!/bin/sh' '' 'just ci' > .git/hooks/pre-push
|
||||
@ -223,4 +223,4 @@ test-timeout: test-timeout-lua test-timeout-shell
|
||||
|
||||
# Lint all Lua source with luacheck.
|
||||
check: check-luacheck
|
||||
luacheck .
|
||||
luacheck --quiet .
|
||||
|
||||
@ -23,12 +23,12 @@ agent workflows if agents run one verification path and hooks run another.
|
||||
|
||||
Install two local Git hooks through `just install` / `just install-git-hooks`:
|
||||
|
||||
- `.git/hooks/pre-commit` runs `just test`.
|
||||
- `.git/hooks/pre-commit` runs `just check test`.
|
||||
- `.git/hooks/pre-push` runs `just ci`.
|
||||
|
||||
When an agent is explicitly asked to commit and/or push, it should not run `just test`
|
||||
manually before the Git operation. The hook is the source of truth for that workflow:
|
||||
commit triggers `just test`, and push triggers `just ci`.
|
||||
commit triggers `just check test`, and push triggers `just ci`.
|
||||
|
||||
Manual verification is still appropriate outside commit/push workflows. For example, run
|
||||
`just test` while developing a behavior change, and run `just ci` when checking the full
|
||||
|
||||
Loading…
Reference in New Issue
Block a user