What problem does it solve?
Adding a new .NET code analysis (CA####) rule to the NetAnalyzers package involves many error-prone steps: allocating an unclaimed diagnostic ID, wiring resx/xlf localization, recording the rule in release tracking, and writing analyzer/code-fix tests. This Skill guides the entire workflow so nothing is missed.
Core Features & Use Cases
- Diagnostic ID allocation: Runs a script that scans the working tree, local branches, and open dotnet/sdk PRs to propose a free CA ID and prints the exact range edit.
- Authoring guidance: Provides patterns for writing language-agnostic analyzers, code fixers, fix-all providers, and MSTest tests with the VerifyCS/VerifyVB harness.
- Porting support: Maps paths and conventions for porting rules or PRs from the retired dotnet/roslyn-analyzers repository.
- Use Case: You want to add a new performance analyzer CA1878 with a code fix. The Skill walks you through ID allocation, descriptor creation with RuleLevel, resx/xlf string generation, AnalyzerReleases.Unshipped.md tracking, and test coverage requirements.
Quick Start
Ask the assistant to add a new CA analyzer rule for a specific performance or reliability pattern in the NetAnalyzers project.