Gendarme Rules Customisation
Does anyone know the correct way to explicitly specify which rules Gendarme will use? Or which rules to exclude? I'm not having a lot of joy searching the Mono documentation for the answer.
What I'm trying to do is to specify the rules one by one in the Gendarme rules.xml file like this:
<rules include="AvoidAssemblyVersionMismatchRule" from="Gendarme.Rules.BadPractice.dll"/>
Doing this, I'm hoping 开发者_如何学运维we can then switch off the rules we don't care about. The problem is, after specifying all the rules in this way, I'm getting a different number of defects detected compared with when I use the default method Gendarme provides, which is of the form:
<rules include="*" from="Gendarme.Rules.BadPractice.dll"/>
<rules include="*" from="OTHER DLL NAMES"/>
Has anyone done this before? Or can anyone point me in the direction of some Gendarme rules usage documentation?
To answer my own question:
Specifying the rules explicitly as I outlined above is the correct way to customise the rules list, the reason I was getting a different number of results back was because the "default" rule set in Gendarme leaves out scanning for Code Smells, once I added this scan to the default list, the defect totals matched.
精彩评论