Feature: check_code tool to flag deprecated and anti-pattern Unity APIs with line numbers

オープン
#39 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp, unity
領域
game-dev, tooling

調査の方向性

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 の本文から書いたものです。

説明

feature mcp-server priority: medium

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.json plus new Unity 6 renames (velocity -> linearVelocity, drag -> linearDamping, FindObjectsOfType -> FindObjectsByType, CGPROGRAM in URP, Camera.main in Update, GetComponent in Update, GameObject.Find in hot paths, async void outside event handlers, new WaitForSeconds in 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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/Unity-Developer-Tools のほかの issue

TMHSDigital/Unity-Developer-Tools の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。