Stylecopanalyzers: Provide configuration options for SA1101/SX1101

Created on 31 Jan 2018  路  1Comment  路  Source: DotNetAnalyzers/StyleCopAnalyzers

Our coding rules generally prefer not using this, but with an exception for (static) fields, so neither SA1101 nor SX1101 match our rules.

Proposal is to provide a configuration option for this case.
I am unsure about the best way how to configure. To satisfy our use case, a simple configuration entry would be enough, like: "doNotPrefixLocalCallsExceptFields": true.
A more sophisticated configuration would be an exclusion list, like "doNotPrefixLocalCallsExcept": [ "fields" ] for SX1101 and
"prefixLocalCallsExcept": [ "methods" ] for SA1101, which is more flexible (but a bit prone regarding conflicting settings).

Most helpful comment

I would certainly prefer SA1101 and SX1101 be merged into a single rule, similar to how Use Tabs Consistently was handled. However, the finer-grained control for the rule seems more relevant for the upcoming Roslyn code style feature.

>All comments

I would certainly prefer SA1101 and SX1101 be merged into a single rule, similar to how Use Tabs Consistently was handled. However, the finer-grained control for the rule seems more relevant for the upcoming Roslyn code style feature.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wmjordan picture wmjordan  路  6Comments

MartyIX picture MartyIX  路  5Comments

kindermannhubert picture kindermannhubert  路  6Comments

batwad picture batwad  路  5Comments

drewnoakes picture drewnoakes  路  3Comments