Commit 4aaafc9
fix: resolve shellcheck SC1087 errors in validate-hook-schema.sh (#168)
## Summary
Fix shellcheck SC1087 errors by replacing unbraced variable syntax
`$event[$i]` with proper brace expansion `${event}[$i]` in 11 locations.
## Problem
Fixes #167
The `validate-hook-schema.sh` utility script used `$event[$i]` syntax
which shellcheck interprets as array access without braces. While bash
handles this correctly (since `$event` is a scalar), shellcheck flags it
as an error.
## Solution
Replace all instances of:
- `$event[$i]:` → `${event}[$i]:`
- `$event[$i].hooks[$j]:` → `${event}[$i].hooks[$j]:`
This brings the script into compliance with shellcheck and aligns with
the project's code quality standards per CONTRIBUTING.md.
### Alternatives Considered
- **Disable shellcheck rule**: Rejected because SC1087 is a reasonable
lint rule and the fix is trivial.
- **No change**: Rejected because the project expects shellcheck
compliance.
## Changes
-
`plugins/plugin-dev/skills/hook-development/scripts/validate-hook-schema.sh`:
11 substitutions
## Testing
- [x] `shellcheck --severity=warning` passes (exit code 0)
- [x] Script behavior unchanged (cosmetic fix only)
- [x] No other files affected
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>1 parent 73b9a63 commit 4aaafc9
1 file changed
Lines changed: 11 additions & 11 deletions
Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
0 commit comments