Use a repo-root `.editorconfig` to configure free .NET analyzer and style rules.
Roslynator
Use the open-source free `Roslynator` analyzer packages and optional CLI for .NET. USE FOR: Roslynator.Analyzers setup; Roslynator CLI checks or cleanup; C# linting, static analysis, and code-fix automation. DO NOT USE FOR: overlapping analyzer packs with no consolidation plan; formatting-only work owned by another formatter. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Trigger On
- the repo uses or wants
Roslynator.Analyzers - the team wants Roslynator CLI or extra Roslyn-based rules
- the user asks about C# linting, static analysis, code cleanup, or unused code
Workflow
- Prefer the NuGet analyzer packages for build-enforced checks.
- Use the CLI when the repo needs one of these flows explicitly:
- analyze - fix - find-unused - format
- Build first when Roslynator needs compiled context.
- Configure rule severity and Roslynator behavior in
.editorconfig. - Avoid duplicating the same rules across multiple analyzer packs without a severity plan.
- Treat CLI auto-fix as a controlled change:
- run it on a bounded target first - rebuild - rerun tests
Deliver
- Roslynator package or CLI setup that fits the repo
- explicit ownership of rule severity
- repeatable commands for analyze, fix, or unused-code workflows when the repo adopts them
Validate
- Roslynator adds value beyond the current analyzer baseline
- CI commands remain reviewable and reproducible
- the repo is not confusing Roslynator CLI with the analyzer package itself
Load References
Related skills
Use the open-source free `CSharpier` formatter for C# and XML.
Use Chous in .NET repositories that ship sizeable frontend codebases and want file-structure linting, naming convention enforcement, and folder-layout policy as a CLI gate.