Repository navigation
fix(capability-hosting): 拆分装配方法降低认知复杂度 - #976
Conversation
Build 认知复杂度 17 超过 Sonar S3776 阈值 15,把同 Id 查重 循环拆为私有 CollectModulesById、宿主豁免与过滤启用两循环 拆为私有 CollectEnabledModules,控制流逐条等价,公共 API 零变化。 Linear: GFX-1206
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
模块收集与 Build 接入 Capability/GameFrameX.Capability.Hosting.Core/CapabilityHostBuilder.cs |
新增 CollectModulesById 和 CollectEnabledModules。Build 调用这两个方法,并继续使用收集结果执行依赖检查。 |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Refactor
Possibly related PRs
- GameFrameX/GameFrameX.Server.Source#962:该 PR 涉及同一文件中的重复 Id 处理和宿主模块筛选行为,与本次重构的模块收集逻辑直接相关。
Merge Risk: 
Minimal · up to 1ab61
-
No material behavior change or actionable regression was found in this refactoring.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 inconclusive Passed checks: 4 passed-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 1 files.
-
Full details: Linked Issues check
-
Explanation
直接关联问题
#967要求修复CapabilityHostBuilder.Build的 S3776 认知复杂度问题,并验证 Sonar 不再报告AaGbDSatSfXs_0aOrNb4。本次差异将重复 ID 检查和启用模块收集提取到两个私有方法,且未修改公共 API。代码差异支持控制流拆分,但当前证据未包含质量工作流结果,也未证明 Sonar 已不再报告该键。因此无法确认全部验收条件已完成。Resolution
提供本次提交对应的仓库质量工作流结果,并提供 Sonar 对
AaGbDSatSfXs_0aOrNb4不再报告的验证证据。
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
|



Fixes GFX-1206
Closes #967
Summary by CodeRabbit