fix(patches): validator portability, clearer docs, broader hook trigger
This commit is contained in:
parent
a826a27246
commit
f3f3bfa20d
1 changed files with 2428 additions and 8 deletions
37
.superpowers/handoff/task-B3-brief.md
Normal file
37
.superpowers/handoff/task-B3-brief.md
Normal 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"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Loading…
Reference in a new issue