dotnet / dotnet/extensions

Include `StyleCop` analyzer in `Microsoft.Extensions.StaticAnalysis`

Open
#7,214 8 comments 0 reactions 0 assignees View on GitHub
area-fundamentals untriaged
Dominant language
C#
Stars
3.2k
Forks
894
Avg merge
1d 12h
Merged PRs (30d)
23

Description

We have started using `Microsoft.Extensions.StaticAnalysis` in most of our projects as a means to standardize and unify on a more strict static analysis profile without introducing too much maintenance overhead (just a single preconfigured NuGet).

However, we would also like to introduce standard `StyleCop` analyzer rules to our repositories, enforcing common practices in the .NET ecosystem:
- https://www.nuget.org/packages/StyleCop.Analyzers/

While we can include the `StyleCop` analyzer separately and configure it to our liking, I think it would make a lot of sense for that analyzer to be included in this extension for the same reason that the other analyzers are included today:

- Microsoft-defined standard set of rules without needing extra configuration on consumers, provides higher cohesion across the ecosystem
- Centralized inclusion via a single package that is easier to maintain across multiple repositories and solutions

Would it be possible for `Microsoft.Extensions.StaticAnalysis` to include `StyleCop`?

@sharwell FYI

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.