Use a repo-root `.editorconfig` to configure free .NET analyzer and style rules.
StyleCop Analyzers
Use the open-source free `StyleCop.Analyzers` package for naming, layout, documentation, and style rules in .NET projects. Use when a repo wants stricter style conventions than the SDK analyzers alone provide.
Trigger On
- the repo wants
StyleCop.Analyzers - naming, layout, or documentation style needs stronger enforcement
- the team needs
stylecop.jsonguidance
Workflow
- Add
StyleCop.Analyzersonly if the repo wants its opinionated style rules. - Keep severity in the root
.editorconfig. - Use
stylecop.jsononly for StyleCop-specific behavioral options. - Prefer one checked-in
stylecop.jsonper repo unless a project genuinely needs its own behavior. - Avoid rule duplication with SDK analyzers or other analyzer packs when possible.
Deliver
- explicit StyleCop package setup
- repo-owned StyleCop rule configuration
- clear split between root
.editorconfigandstylecop.json
Validate
- StyleCop severity is versioned in repo config
stylecop.jsonis used only where it adds value
Load References
references/stylecop-analyzers.mdreferences/rules.mdreferences/config.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