Is it possible to suppress StyleCop rules in a more global what... in other words not just using source in-line attributes?
right-click on a project in Project Explorer. select "StyleCop Settings" on the "Rules" tab of the dialog that opens, uncheck the "C#" root of the Enabled rules tree.
In your StyleCop install, there's a Settings. StyleCop file. You can edit this to turn off rules globally. Drag that file onto the Settings Editor executable in that file to edit it.
Configuring StyleCop is done in two optional steps. First, you can use rule set files to configure which rules are checked and how strongly you feel about them. Second, you can add a stylecop. json file to your project to fine-tune some rules.
You can disable certain stylecop rules with a Settings.StyleCop file. For example there's certain things built into stylecop that doesn't fit with our standard. For example in my Settings.StyleCop file we have:
<Analyzer AnalyzerId="Microsoft.StyleCop.CSharp.ReadabilityRules">
<Rules>
<Rule Name="PrefixLocalCallsWithThis">
<RuleSettings>
<BooleanProperty Name="Enabled">False</BooleanProperty>
</RuleSettings>
</Rule>
</Rules>
<AnalyzerSettings />
</Analyzer>
Such that on a member variable or property we don't have to have "this." for each and every one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With