You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ego-lint): skip signal callback bodies in constructor init check (#129)
## Summary
- Add `filter_signal_callbacks()` to `check-init.py` that excludes
signal callback body lines (`.connect()`, `.connectObject()`) from the
constructor init-time check, while still checking the `.connect()` line
itself (the receiver may be a Shell global accessed at construction
time)
- Add test fixture `init-constructor-signal@test` with both `.connect()`
and `.connectObject()` callbacks containing Shell globals, plus a direct
Shell global access that should still be flagged
- Mark tiling-shell annotation for constructor signal callback FP as
fixed
## Context
Issue #118 identified 8 FPs for `init/shell-modification` across
tiling-shell and v-shell. Research showed that 6 of 8 were already
resolved by prior PRs (#21 scoped constructor checks to extension.js,
#88 added arrow fn exemption). The remaining 2 (tiling-shell
`globalState.js` constructor signal callbacks) are addressed by this PR.
Signal callbacks are deferred — they don't execute during construction,
only when the signal fires at runtime. The `.connect()` line itself is
kept because the receiver object (e.g., `Main.panel.connect(...)`) IS
accessed immediately during construction.
## Test plan
- [x] New fixture `init-constructor-signal@test` verifies:
- Direct Shell global in constructor is flagged (line 10)
- `.connect()` callback body is NOT flagged (lines 15-17)
- `.connectObject()` callback body is NOT flagged (lines 21-24)
- [x] All 653 existing test assertions pass (0 regressions)
- [x] Existing init fixtures unchanged: `init-time-safety`,
`init-helper-constructor`, `init-modification`, `constructor-gobject`
Closes#118
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments