Commit 9d6654a
fix(ego-lint): handle async arrow functions and GObject branch in check-init.py (#55)
## Summary
- Update `ARROW_FN_DEF` regex to include optional `async` keyword so
`const fn = async () => Main.panel.x` is not flagged
- Add `ARROW_FN_DEF` exemption to the `GOBJECT_CONSTRUCTORS` branch so
`const make = () => new St.Label()` at module scope is not flagged
- Add test fixture cases and assertions for both scenarios
Closes #45
## Test plan
- [x] `python3 check-init.py` correctly flags only the true violation
(line 5) and exempts all arrow function lines
- [x] Full test suite passes (561 assertions)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent c6c61be commit 9d6654a
File tree
3 files changed
+13
-0
lines changed- skills/ego-lint/scripts
- tests
- fixtures/init-time-safety@test
3 files changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
198 | 199 | | |
199 | 200 | | |
200 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
201 | 206 | | |
202 | 207 | | |
203 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| |||
0 commit comments