Skip to content

fix(localization): 重命名 AdminApi.OptionsInvalid 消除 S3218 遮蔽 - #550

Merged
AlianBlank merged 2 commits into
mainfrom
feature/auto-server-source-worker-run-10194-20261013T0300
Oct 13, 2026
Merged

AlianBlank merged 2 commits into
mainfrom
feature/auto-server-source-worker-run-10194-20261013T0300

Conversation

@AlianBlank

@AlianBlank AlianBlank commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Linear: GFX-892

Summary by CodeRabbit

  • 优化
    • 管理面监听选项为空或无效时,错误提示继续使用相同的本地化资源键。

嵌套常量 Keys.Capability.Hosting.AdminApi.OptionsInvalid 遮蔽外层
Hosting.OptionsInvalid(Sonar csharpsquid:S3218 CRITICAL),按字段级
消歧约定改名 AdminApiOptionsInvalid 并同步唯一调用点;键串与双 resx
条目不变,外层公共 API 零改动。

Linear: GFX-892
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3012d2fa-b08d-4ddd-bf78-37ac7445ff23
📥 Commits

Reviewing files that changed from the base of the PR and between 272ef6c and d131df4.

📒 Files selected for processing (2)
  • GameFrameX.Launcher/Online/OnlineAdminApiComposition.cs
  • GameFrameX.Localization/Keys.Capability.cs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8fb8ac94-5e45-45e7-bbd2-6f3fd8e04a74
📥 Commits

Reviewing files that changed from the base of the PR and between 5fc2ada and 272ef6c.

📒 Files selected for processing (2)
  • GameFrameX.Localization/Keys.Capability.cs
  • GameFrameX.Online.Runtime/OnlineAdminApiComposition.cs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

本次变更将管理 API 选项错误的本地化常量重命名为 AdminApiOptionsInvalid,并更新选项验证代码中的引用。资源键字符串和抛出的异常类型保持不变。

Changes: 管理 API 错误键

Layer / File(s) Summary
重命名错误键并更新引用
GameFrameX.Localization/Keys.Capability.cs, GameFrameX.Online.Runtime/OnlineAdminApiComposition.cs
本地化常量由 OptionsInvalid 改名为 AdminApiOptionsInvalid,其资源键字符串保持不变。选项验证改用新常量;无效选项仍会触发 InvalidOperationException。

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Refactor

Merge Risk: ⚪ Minimal · up to 272ef

仍使用旧常量名的下游源码需要同步更新;仓库允许此类公共 API 源码级破坏性变更,且本次调用处已更新、资源键未变,没有发现需要阻止合并的风险。

Pre-merge checks · Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 标题准确描述了主要变更:重命名 AdminApi.OptionsInvalid 以消除 Sonar 规则 S3218 遮蔽问题。
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch feature/auto-server-source-worker-run-10194-20261013T0300
📝 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

@AlianBlank
AlianBlank merged commit e08c978 into main Oct 13, 2026
3 checks passed
@AlianBlank
AlianBlank deleted the feature/auto-server-source-worker-run-10194-20261013T0300 branch October 13, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant