find-and-setup-analysis-rule

Installation
SKILL.md

Finds an analysis rule that flags a coding pattern as the code is written, and sets it up in the Unity project. An analysis rule is an IDE inspection or a Roslyn analyzer rule, and a diagnostic is what it reports on the code it flags.

Input

Take the coding pattern from the pattern argument: a description, the code the analysis rule should flag, and optionally the code it should not, e.g., the code before and after a bug fix. Combine the argument with the coding pattern in the conversation, if any; when the argument is omitted, take it from the conversation alone. A named API, e.g., "ban GameObject.Find", is the code to flag. If the code to flag is missing, or the input fits several patterns, use AskUserQuestion to ask the user before proceeding.

When the input names a Roslyn analyzer package to install, e.g., "install BannedApiAnalyzers", take the package instead of a coding pattern: skip Step 1, and in Step 2 propose installing it per Roslyn Analyzer Package. Leave every rule at its default severity unless the user specifies one; set a specified severity per Configuration.

Workflow

Step 1: Find an Analysis Rule

Choose the option whose diagnostic meets the user's need, by where each option diagnoses:

Installs
1
GitHub Stars
20
First Seen
2 days ago