pdftract/.git-hooks/pre-commit
jedarden b4fac0932f fix(pdftract-5z5d8): add pre-commit hook for provenance validation
Add pre-commit hook that runs check-provenance.sh before each commit
to ensure fixture files always have valid provenance entries. Update
PROVENANCE.md with validation section documenting the hook usage.

Acceptance criteria:
- PROVENANCE.md exists with one row per fixture file ✓
- Every fixture file enumerated; no orphans ✓
- License column populated; only approved licenses ✓
- SHA256 column populated; matches actual content ✓
- check-provenance.sh validates manifest; CI gate green ✓
- Synthetic fixtures point at generation scripts ✓

Refs: pdftract-5z5d8

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-05-17 23:50:28 -04:00

14 lines
392 B
Bash
Executable file

#!/usr/bin/env bash
# Pre-commit hook: Validate fixture provenance before allowing commits.
# This ensures every fixture file has a corresponding PROVENANCE.md entry.
#
# To install this hook:
# ln -s ../../.git-hooks/pre-commit .git/hooks/pre-commit
# Or run: make install-hooks (if Makefile exists)
set -e
# Run the provenance validation script
bash scripts/check-provenance.sh
exit 0