refactor(init): address PR #124 review feedback#155
Conversation
- Drop commit-message-style comment above runners import; the docstring and import names cover the contract. - Trust ctx.deps in runFormatters; gatherContext already reads deps from disk, so the fallback readDeps call was dead code in practice. - Drop try/catch blocks around Bun.spawn/which/spawnSync mock setters; verify the assignment took effect instead, so a future non-writable property fails fast rather than silently running against real globals. - Extract the Bun override cast once to reduce boilerplate. - Add test locking in best-effort behavior when a formatter exits non-zero.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe changes remove disk-based dependency discovery from the formatter initialization logic. The production code ( Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Summary
Follow-up to #124 addressing review feedback that landed after merge.
runFormattersto trustctx.deps.gatherContextalready callsreadDeps, so thereadDeps(ctx.cwd)fallback was dead code in practice and masked intent.try/catchblocks aroundBun.spawn/which/spawnSyncmock setters informat.test.ts. They swallowed mock-assignment failures; if Bun ever makes those properties non-writable, tests would run against real globals with confusing results. Now verify the assignment took effect and fail fast.Bunoverride cast once to cut boilerplate.Test plan
bun run testpasses