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:
- AnalyzerId : You have to mentioned the class name of the rule often found in warning or error of the StyleCop.
- 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)
- <BooleanProperty> : Make sure the Value under this tag is false.
- You can have multiple Rule tags under a Rules tag. Make sure all the rule comes under same class name.
- Similarly you have multiple Analyzer tags under a Analyzers tag.