StyleCop : Setting Rule explained

We will try to understand how to write the XML content to suppress rules. The sample XML can be found in the older post here.

Lets try to understand the XML attributes & tag in below mentioned points:

  1. AnalyzerId : You have to mentioned the class name of the rule often found in warning or error of the StyleCop.
  2. Name : You need to mentioned the actual rule that you are trying to suppress. You can find the entire list of rules in here. (For some reason if you are unable to open the chm file. Right click the file => Properties => unblock the file)
  3. <BooleanProperty> : Make sure the Value under this tag is false.
  4. You can have multiple Rule tags under a Rules tag. Make sure all the rule comes under same class name.
  5. Similarly you have multiple Analyzer tags under a Analyzers tag.
Advertisement

1 comment

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: