Add local pre-push validation gates #34

Merged
andrew merged 1 commits from 32 into main 2026-08-05 18:49:02 -04:00
Collaborator

Closes #32

Adds an installable .githooks/pre-push hook that runs optional cppcheck, the default build and ctest, and the AKERR_USE_STDLIB=OFF build and ctest before pushes. Mutation testing is opt-in via AKERR_HOOK_MUTATION=1. Documents installation, isolated hook build directories, and the --no-verify escape hatch.

Closes #32 Adds an installable .githooks/pre-push hook that runs optional cppcheck, the default build and ctest, and the AKERR_USE_STDLIB=OFF build and ctest before pushes. Mutation testing is opt-in via AKERR_HOOK_MUTATION=1. Documents installation, isolated hook build directories, and the --no-verify escape hatch.
logikoma added 1 commit 2026-08-05 18:35:12 -04:00
Add local pre-push validation gates
All checks were successful
libakerror CI Build / cmake_build_freestanding (push) Successful in 2m37s
libakerror CI Build / cmake_build (push) Successful in 2m52s
libakerror CI Build / sanitizer (push) Successful in 2m56s
libakerror CI Build / coverage (push) Successful in 2m49s
libakerror CI Build / mutation_test (push) Successful in 47m10s
5dfb03eadd
Co-authored-by: Andrew Kesterson <andrew@starfort.tech>
logikoma requested review from andrew 2026-08-05 18:35:19 -04:00
Owner

@tachikoma please review

@tachikoma please review
Collaborator

Reviewed the diff (.githooks/pre-push + README).

  • Ref parsing on stdin correctly detects delete-only/no-op pushes and skips the gates.
  • cppcheck step degrades gracefully when scripts/cppcheck.sh or the cppcheck binary is missing (neither is present in-tree today, so it's a no-op for now, as expected).
  • Default and AKERR_USE_STDLIB=OFF builds use separate build dirs under .git/akerr-prepush, so they won't clobber the normal build/ directory or each other.
  • Mutation testing flags (--target src/error.c, --threshold) match scripts/mutation_test.py's actual argparse options.
  • run() captures full output to a log and only dumps it on failure, keeping the happy path quiet; --no-verify escape hatch is documented in both the script header and README.

No issues found. Looks good to merge from my side.

Reviewed the diff (.githooks/pre-push + README). - Ref parsing on stdin correctly detects delete-only/no-op pushes and skips the gates. - cppcheck step degrades gracefully when scripts/cppcheck.sh or the cppcheck binary is missing (neither is present in-tree today, so it's a no-op for now, as expected). - Default and AKERR_USE_STDLIB=OFF builds use separate build dirs under .git/akerr-prepush, so they won't clobber the normal build/ directory or each other. - Mutation testing flags (--target src/error.c, --threshold) match scripts/mutation_test.py's actual argparse options. - run() captures full output to a log and only dumps it on failure, keeping the happy path quiet; --no-verify escape hatch is documented in both the script header and README. No issues found. Looks good to merge from my side.
andrew merged commit 20c180265f into main 2026-08-05 18:49:02 -04:00
Sign in to join this conversation.