Enabling or Disabling StyleCop Rules

It is possible to enable or disable individual StyleCop rules at the project level. First, read this page to learn how to bring up the settings dialog for a particular project.

Bring up the settings dialog for a particular project, and select the Rules tab, as shown below:

enablingordisablingstylecoprules_1.bmp

A rule can be enabled or disabled by checking or unchecking the checkbox next to the rule.

Detailed Settings

Some rule categories also expose detailed settings which control the general behavior over that category of rules. These detailed settings appear in the Detailed settings box on the right of the dialog, when a category is selected. For example, selecting the Documentation Rules node reveals the following detailed settings:

enablingordisablingstylecoprules_2.bmp

Rule Explanation

A brief explanation of each rule, or each detailed setting, appears in the box at the bottom of the dialog when the rule or setting is selected.

Overriding Parent Settings

It is possible to set up the settings files so that some settings apply to more than one project, as described here. When this type of configuration is enabled, it is possible to override a shared setting on a particular project. Overridden settings are bolded within the settings dialog, as shown below:

enablingordisablingstylecoprules_3.bmp

Last edited Jul 20, 2010 at 9:25 PM by jasonall, version 6