refactor: inline single-caller snippetFor, hoist htmlHeaders to const#7
Conversation
snippetFor() only delegated to SNIPPETS[target] with one caller; inline it. htmlHeaders() built an identical object on every call; make it a shared HTML_HEADERS const. No behavior change.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTwo one-liner helper functions are eliminated: ChangesHelper inlining refactor
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Two micro-simplifications from a ponytail over-engineering audit. No behavior change.
snippetFor()only delegated toSNIPPETS[target]with one caller — inlined, function removed (src/cli.ts).htmlHeaders()built an identical object on every call (2 callers, never varies) — hoisted to a sharedHTML_HEADERSconst (src/core.ts).Net ~-8 lines. typecheck + biome clean, 155/155 tests pass.
Summary by CodeRabbit