Use the open-source free `CSharpier` formatter for C# and XML.
.NET Analyzer Configuration
Use a repo-root `.editorconfig` to configure free .NET analyzer and style rules. Use when a .NET repo needs rule severity, code-style options, section layout, or analyzer ownership made explicit. Nested `.editorconfig` files are allowed when they serve a clear subtree-specific purpose.
Trigger On
- the repo needs a root
.editorconfig - analyzer severity and style ownership are unclear
- the team wants one source of truth for rule configuration
Workflow
- Prefer one repo-root
.editorconfigwithroot = true. - Add nested
.editorconfigfiles when a subtree has a clear scoped purpose, such as stricter rules, different generated-code handling, or a different policy for tests or legacy code. - Keep severity in
.editorconfig, not scattered through IDE settings. - Write the file as real EditorConfig, not as a made-up
.NETvariant:
- lowercase filename .editorconfig - root = true in the preamble - no inline comments - forward slashes in globs
- Keep bulk switches such as
EnableNETAnalyzersin MSBuild files, not in.editorconfig. - Treat
.globalconfigas an exceptional case, not the normal repo setup.
Deliver
- one explicit analyzer configuration ownership model
- a root
.editorconfiglayout that agents can extend safely
Validate
- rule severity is reproducible in local and CI builds
- IDE-only settings do not silently override repo policy
- the default path is a root
.editorconfig, not a surprise alternative
Load References
references/analyzer-config.mdreferences/template.mdreferences/rules.md
Related skills
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.
Use the free built-in .NET SDK analyzers and analysis levels with gradual Roslyn warning promotion.
Related agents
.NET Review
Review orchestration agent for .NET changes across bugs, regressions, analyzers, architecture, tests, and maintainability.
Also works: dotnet agents install review