Gendarme Ignore List Format

1.5k views Asked by At

I'm working on a C# solution and I'm using Gendarme integrated with Visual Studio in order to output to the Error List window when I compile.

I can see in the source-code and documentation for Gendarme that you can specify an ignore list to get Gendarme to ignore certain classes within an assembly but I can't for the life of me find any documentation online that shows an example of the format required for this file.

Can anyone help?

2

There are 2 answers

0
Anssssss On

This link describes the format and also has a helpful note: http://manpages.ubuntu.com/manpages/oneiric/man5/gendarme.5.html

An ignore-file can be generated automatically (using gd2i) from a XML defect list produced by Gendarme.

0
Yuri Stuken On

This is pretty simple and you can find an example in the self-test.ignore file. The basic ignore rule format is the following:

R: Gendarme.Rules.Category.Name
T: Excluded.Class.Name
N: Excluded.Namespace.Name
M: System.Void Excluded.Class::ExcludedMethodSignature(System.Int32)
A: ExcludedAssembly
... (other lines related to this rule)

R: Gendarme.Rules.Next.Rule
...

You might also wish to take a look at the ignore file parsing code.