Add pre-push validation hook
This commit is contained in:
12
AGENTS.md
12
AGENTS.md
@@ -169,10 +169,11 @@ a line, so it rewrites runs of spaces anywhere and destroys the hand-aligned
|
||||
value columns in the bit-flag tables in `actor.h` and `iterator.h`. Only leading
|
||||
whitespace is ever rewritten.
|
||||
|
||||
### The pre-commit hook
|
||||
### The Git hooks
|
||||
|
||||
`scripts/hooks/pre-commit` reindents staged C sources before the commit is
|
||||
written. Enable it once per clone:
|
||||
written, and `scripts/hooks/pre-push` runs the local build and test gates before
|
||||
anything leaves the clone. Enable both once per clone:
|
||||
|
||||
```sh
|
||||
git config core.hooksPath scripts/hooks
|
||||
@@ -184,7 +185,12 @@ working tree and re-staged — but only if the index and working tree agree for
|
||||
that file. If they differ, re-staging would sweep unstaged work into the commit,
|
||||
so the hook stops and tells you to reindent and stage it yourself. It steps
|
||||
aside during a merge, and warns rather than blocking if Emacs is unavailable.
|
||||
`git commit --no-verify` bypasses it.
|
||||
`git commit --no-verify` and `git push --no-verify` bypass their respective hooks.
|
||||
The pre-push hook excludes performance suites, runs optional cppcheck and Doxygen
|
||||
when available, and puts the slower memcheck and mutation gates behind
|
||||
`AKGL_HOOK_MEMCHECK=1` and `AKGL_HOOK_MUTATION=1`. Its private build is under
|
||||
`.git/akgl-prepush`; CI remains the hard gate because `core.hooksPath` is local to
|
||||
each clone.
|
||||
|
||||
For reference, `cc-mode` defines the style as:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user