832 B
832 B
Task B3: Hook the validator into pre-commit
Files:
- Modify:
.pre-commit-config.yaml
Interfaces:
-
Produces: a local hook that runs
local/validate-patches.Rwhen the registry or patch files change. -
Step 1: Add the hook
Add a repo: local hook entry to .pre-commit-config.yaml:
- repo: local
hooks:
- id: validate-patches
name: validate patch registry
entry: Rscript local/validate-patches.R
language: system
files: ^local/patches/
pass_filenames: false
- Step 2: Verify the hook runs
Run: pre-commit run validate-patches --all-files
Expected: hook passes (Patch registry OK).
- Step 3: Commit
git add .pre-commit-config.yaml
git commit -m "ci(patches): validate patch registry in pre-commit"