fix: refactor config.ts env var loading to table-driven pattern#219
fix: refactor config.ts env var loading to table-driven pattern#219
Conversation
- Replace 10 nearly-identical if-blocks with ENV_MAP_STRING and ENV_MAP_NULLABLE lookup tables iterated in a loop - Remove deprecated mcpwc.config.json fallback and its warning message - readConfigFile() now only reads helixir.mcp.json Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 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 |
Summary
packages/core/src/config.ts lines 95-124 contain 10 nearly identical if-blocks for loading env vars:
This is duplicate code that's error-prone (typos in env var names would be silent). Should be refactored to a lookup table mappi...
Created automatically by Automaker