Proposal: Have stylecop.json fully control StyleCop settings
See original GitHub issueCurrently, only a fraction of StyleCop warnings/errors can be configured using stylecop.json
. This is very frustrating when trying to create settings for the team.
Can we get stylecop.json
to fully cover each and every StyleCop rule?
Let me suggest an implementation detail that’d make fully covering StyleCop through stylecop.json
easy: I don’t believe we need dedicated texts in stylecop.json
that differ from StyleCop warning/error numbers. They are syntactic sugar, but essentially it’d be sufficient to provide a JSON schema like this:
"StyleCopErrorNumber": "ignore|warning|error"
Providing named aliases for StyleCop error numbers would be alright, though:
{ "SA1101" : "ignore" }
// equivalent to:
{ "PrefixLocalCallsWithThis" : "ignore" }
This way you avoid any manual implementation for parsing the stylecop.json
file. Instead, parsing the stylecop.json
file would be a snap. Plus, using the stylecop.json
as single source of truth would become comprehensive.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
Users will soon have the ability to control this via .editorconfig files (a compiler feature which will ship in an upcoming release).
Yes, that’s correct. The documentation will be published on Monday on this page: https://docs.microsoft.com/en-us/visualstudio/code-quality/use-roslyn-analyzers?view=vs-2019