What is the difference between them from the point of view of the rules? Are the rule sets close enough to just use one of them? Then which one to choose?
Asked
Active
Viewed 89 times
1 Answers
0
Use both.
StyleCop.Analyzers concentrates on the style used in the source code. It will ensure that you follow a specific coding style that will be understood by anyone who looks at your code (assuming they are familiar with the style enforced by StyleCop). https://github.com/DotNetAnalyzers/StyleCopAnalyzers/tree/master/documentation
Microsoft.CodeAnalysis concentrates on finding problematic code constructs. It can find problems that are not obvious. https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/overview
Compare the CA* warnings with the SA* warnings and the difference between the tools should be apparent.

James Rustad
- 1
- 1
- 1