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 when a repo wants broad C# static analysis, auto-fix flows, dead-code detection, optional CLI checks, or extra rules beyond the SDK analyzers.
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
references/rules.mdreferences/config.mdreferences/roslynator.md
Related skills
Use the open-source free `CSharpier` formatter for C# and XML.
CSharpier
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.
Chous