user1039583
user1039583

Reputation: 41

How to suppress specific Gendarme rules at project or assembly level

I need to suppress unwanted gendarme rules for the whole assembly of my project or even for individual projects. Is there any option available? Thanks in advance.

Upvotes: 1

Views: 621

Answers (1)

poupou
poupou

Reputation: 43553

The easiest way is to create an .ignore file for your project.

E.g. to ignore a specific rule for all assemblies (e.g. a project) you can add the following lines in your ignore file:

R: Gendarme.Rules.Smells.AvoidSwitchStatementsRule
A: *

Here's a link to Gendarme's ignore file used for it's self-check.

Upvotes: 2

Related Questions