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. USE FOR: the repo wants StyleCop.Analyzers; naming, layout, or documentation style needs stronger enforcement; the team needs stylecop.json guidance. DO NOT USE FOR: repos that intentionally rely only on SDK analyzers; repos where StyleCop overlaps too heavily with an existing style package and no. 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 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
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.