analyzer-codefix

Installation
SKILL.md

Roslyn Analyzer, Code Fix & Code Refactoring Patterns

When to Use

  • Adding a new IDE analyzer (IDE0xxx diagnostic)
  • Implementing or modifying a CodeFixProvider
  • Implementing or modifying a CodeRefactoringProvider
  • Writing tests for analyzers, code fixes, or refactorings
  • Working with AbstractBuiltInCodeStyleDiagnosticAnalyzer

IDE Diagnostic IDs

All IDE diagnostics use IDE0xxx format, defined as constants in src/Analyzers/Core/Analyzers/IDEDiagnosticIds.cs. Always reference these constants rather than hardcoding string IDs.

Analyzer Patterns

Code Style Analyzer (preferred for IDE diagnostics)

Inherit from AbstractBuiltInCodeStyleDiagnosticAnalyzer — not raw DiagnosticAnalyzer:

Installs
2
Repository
dotnet/roslyn
GitHub Stars
20.4K
First Seen
Apr 14, 2026
analyzer-codefix — dotnet/roslyn