Feature: check_code tool to flag deprecated and anti-pattern Unity APIs with line numbers
还没有人认领这个 Issue。
评估
调研方向
Start by locating deprecated_patterns.json, the existing lookup_api MCP tool, and the performance-optimization and csharp rules mentioned in the issue. Define the scanner and data schema around those entry points, then add a fixture covering each listed pattern and verify the reported line numbers, replacements, and reasons. Done means check_code flags every fixture pattern with the correct line number.
由索引模型根据 Issue 内容生成。
描述
Why it matters
deprecated_patterns.json already maps legacy APIs to replacements, but it is only used as a side-warning in lookup_api. Developers upgrading to Unity 6 (or AI agents reviewing code) want "scan this file and tell me what to change". That is concrete, high-value, and easy to demo.
Proposal
New MCP tool check_code(code | file_path):
- Regex/token match against
deprecated_patterns.jsonplus new Unity 6 renames (velocity->linearVelocity,drag->linearDamping,FindObjectsOfType->FindObjectsByType,CGPROGRAMin URP,Camera.maininUpdate,GetComponentinUpdate,GameObject.Findin hot paths,async voidoutside event handlers,new WaitForSecondsin loops). - Returns line numbers, the replacement, and a reason, optionally with a suggested patch.
- Extend the data schema with
pattern(regex),severity,autofix.
Stretch: ship the same patterns as a Roslyn analyzer package for Unity, so the checks run in the editor and CI too.
Done when
check_code flags every pattern in a fixture file with correct line numbers, and the performance-optimization and csharp rules point the agent at it.
- 主要语言
- C#
- 星标
- 4
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/Unity-Developer-Tools 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
-
ci priority: low skills
难度 3/5 1-2 天 新手友好度 55/100
-
good first issue skills testing
难度 3/5 1-2 天 新手友好度 58/100
-
ci priority: medium testing
难度 4/5 1-2 天 新手友好度 57/100
-
documentation marketing priority: medium
难度 5/5 一周以上 新手友好度 35/100
查看 TMHSDigital/Unity-Developer-Tools 的全部 Issue
相似的 Issue
-
type:task ux
难度 2/5 1-3 小时 新手友好度 72/100
elsa-workflows/elsa-foundation#5253 ·
维护者通常 1 天内回复