Uh oh!
There was an error while loading. Please reload this page.
feat(config): support forwardPorts range syntax expansion - #168
Conversation
Parse port range notation like '3000-3005' in forwardPorts and expand to individual ports [3000, 3001, ..., 3005]. Mixed ranges and single ports work together; invalid ranges are rejected with clear errors.
✅ Deploy Preview for devsydev canceled.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR adds port range expansion support to devcontainer configuration merging. Port ranges in ChangesPort Range Expansion for Forward Ports
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes 🚥 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. 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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
Extract parsePortRange helper to reduce expandPortRange cyclomatic complexity (cyclop), compact TestExpandPortRange with slices.Equal and inline test cases (funlen), fix continuation-line indentation (gci/gofumpt), and extract repeated "3000-3002" to testPortRange const (goconst).
Uh oh!
There was an error while loading. Please reload this page.
Summary
Adds support for port range notation (e.g.
3000-3005) in the devcontainerforwardPortsfield, expanding ranges into individual ports during config merging. This enables users to specify["8080", "3000-3005"]and have all 7 ports forwarded. Invalid ranges (start > end, negative, non-numeric) are rejected gracefully. Includes 14 unit tests covering single ports, ranges, mixed inputs, deduplication across ranges, and error cases, plus an E2E test validating range expansion throughread-configuration --include-merged-configuration.Summary by CodeRabbit
New Features
Tests