fix(patches): validator portability, clearer docs, broader hook trigger

This commit is contained in:
Patrick Schratz 2026-06-30 09:17:24 +02:00
commit f3f3bfa20d
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -0,0 +1,37 @@
### Task B3: Hook the validator into pre-commit
**Files:**
- Modify: `.pre-commit-config.yaml`
**Interfaces:**
- Produces: a local hook that runs `local/validate-patches.R` when the registry or patch files change.
- [ ] **Step 1: Add the hook**
Add a `repo: local` hook entry to `.pre-commit-config.yaml`:
```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**
```bash
git add .pre-commit-config.yaml
git commit -m "ci(patches): validate patch registry in pre-commit"
```
---