Setting up the gendarme rules

Does anyone know the correct way to explicitly indicate which rules the gendarme will use? Or what rules to exclude? I am not very happy to find Mono documentation for an answer.

What I'm trying to do is specify the rules one by one in the rules.xml file of the gendarme as follows:

<rules include="AvoidAssemblyVersionMismatchRule" from="Gendarme.Rules.BadPractice.dll"/>

By doing this, I hope that we can disable the rules that we do not need. The problem is that after defining all the rules in this way, I get a different number of detected defects compared to when I use the default method that Gendarme provides, which has the form:

<rules include="*" from="Gendarme.Rules.BadPractice.dll"/>
<rules include="*" from="OTHER DLL NAMES"/>

Has anyone done this before? Or can someone point me towards any documentation on the use of gendarme rules?

+3
source share
1 answer

To answer my own question:

Specifying the rules explicitly, as I stated above, is the correct way to configure the list of rules, the reason I got a different amount of results was because the "default" rule set in the gendarme does not check the scent code scan, one Since I added this scan to the default list, the total amount of defects is the same.

+1
source

Source: https://habr.com/ru/post/1735209/


All Articles