Enabling or Disabling StyleCop Rules

It is possible to enable or disable individual StyleCop rules at the project level. First, read this article 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:

Source Analysis Rules Settings

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:

Detailed settings for documentation rules

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:

Overriden rules settings