コードインスペクション
コード品質検査により、古いコードをモダナイズ。LLVM / ClangベースのVisual Assistのコード検査機能は、スタイル違反、インターフェイスの誤用、静的分析によって推測できるバグといった一般的なプログラミングエラーを診断/修正できます。
コードインスペクションの設定
Visual Assistのオプションダイアログで「Code Inspection」を有効にし、特定のコード品質検査機能にチェックを入れます。LLVM / ClangのパーサーがVisual Studioとは別のプロセスで実行され、IDEのパーフォーマンス低下を回避します。
![Code Inspection in options dialog](/Presentation/WholeTomato/Assets/Images/features/codeInspection/ciOptionEnable.png)
エディターでコードの問題を指摘
編集中にコード品質をチェック可能
機能が有効になっていると、Visual Studioのテキストエディターにコードの問題が強調表示されます。特に問題のある最初の数文字に実線または点線が引かれます。
![Underline code issue in editor](/Presentation/WholeTomato/Assets/Images/features/codeInspection/ciEditorHighlight.png)
問題箇所の上にカーソルを合わせると、詳細を確認できます。
![Hover to see details](/Presentation/WholeTomato/Assets/Images/features/codeInspection/ciEditorTooltip.png)
エディターでのクイック修正
編集中にコードを修正
問題の詳細箇所をクリックして、修正方法を確認します。
![Hover to access fix](/Presentation/WholeTomato/Assets/Images/features/codeInspection/ciEditorMenu.png)
修正方法を受け入れ、適用します。
![Accept to apply fix](/Presentation/WholeTomato/Assets/Images/features/codeInspection/ciEditorFixApplied.png)
ツールウィンドウでのクイック修正
コードを一括修正
ツールウィンドウからも、現在のファイルのコードのすべての問題を特定できます。特定レベルまたはコードインスペクションでのすべての問題に、一括修正を適用できます。
![Code issues in a tool window](/Presentation/WholeTomato/Assets/Images/features/codeInspection/ciWindowGroupMenu.png)