fix(network): EndpointParser.ParseAuthority 拆为单一职责派发以消除 Sonar S3776 - #496
Conversation
把 ParseAuthority(Cognitive Complexity 17)按方括号 IPv6 vs 末冒号 host:port 两路径拆为 ParseBracketedIpv6Authority + ParseHostPortAuthority 两个 private 辅助 方法;主方法仅保留空 authority 拒收 + 按 authority[0] 派发。对外签名 / 行为 / 异常消息文本完全等价;端口解析复用既有 ParsePort,DNS 校验复用既有 ValidateDnsHost。EndpointParserTests 38/38 通过。 Linear: GFX-860
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesAuthority 解析
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to Authority parsing is split into focused helpers while retaining existing validation and exception behavior; the change is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|



Linear: GFX-860
Summary by CodeRabbit