GENDARME(5)
πΈ NAME
Gendarme β rule-based code analysis for Mono. It's giving "your code, but make it β¨judgedβ¨". π
β¨ FILE FORMATS β¨
Okay bestie, Gendarme reads a few little config-type files and you're gonna want to know them all, so let's go. π«Ά
π ignore-file
This one filters defects out of your gendarme reports, so you don't have to look at the stuff you already know about. It's a line-oriented format, meaning the first characters of each line tell Gendarme how to read that line:
#β this line is a comment, so it gets skipped entirely. π€R:β filters out a rule, and you put the full name of the rule here.A:β filters out an assembly. The extension can be omitted, no big deal.T:β filters out a namespace qualified type name.M:β filters out a method. It has to contain the full method name exactly as it appears in the report, fr fr.
Also! You can generate an ignore-file automatically (using gd2i, an icon) from an XML defect list produced by Gendarme. No cap. π¦
π¦ rules.xml
This file works together with the --set option to control and configure which rules Gendarme actually uses. It contains a set of named rules (aka rule sets) and each rule set contains a list of rules.
Rules have required from and include attributes, optional exclude and applyTo attributes, and optional parameter child elements. Let's break those down:
- The
fromattribute is the path of a dll to load ("Gendarme.Rules.BadPractice.dll"). Relative paths are relative to the gendarme executable. π - The
includeattribute may be"*"to match every single rule in the dll, or a list of rule names separated by'|'("WhizBangRule | MyRule"). - The
excludeattribute is a list of rule names separated by'|'("IckyRule"). These will override any rules matched by theincludeattribute β so yes, exclude wins. π - The
applyToattribute may be"all","visible", or"nonvisible". If it'sall(the default) then all types in the assemblies are checked; if it'svisiblethen only the externally visible types are checked; if it'snonvisiblethen only the internally visible types are checked. π - The
parameterchild element is used to customize the behavior of a rule within a dll. It has three required attributes:rule,property, andvalue.ruleis the name of the applicable rule ("AvoidSmallNamespaceRule"),propertyis the name of a public property in the rule ("Minimum"), andvalueis the value to assign to the property ("10"). Slay. β¨
π gendarme.exe.config
Used by debug versions of Gendarme to enable logging for rules. A config file will be generated automatically by the make file. To enable logging for a rule, edit the config file, add a switch using the rule's name, and set the value to 1. That's it, that's the whole vibe. π₯
π COPYRIGHT
Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com)
π MAILING LISTS
Mailing lists are listed at the http://groups.google.com/group/gendarme β come hang out π«Ά
β WEB SITE
http://www.mono-project.com/Gendarme
π SEE ALSO
And that's the whole page, bestie!! This was Gendarme(Gendarme 4.2.0.0), and yes the version is literally right there in the title because she's extra like that. Now go forth and let the rules rule. π β¨π
π¦ where this page comes from
- debian bookworm: gendarme 4.2-3.1
- fedora 43: mono-tools-monodoc 4.2-33.fc43 Β· MIT
- fedora 44: mono-tools-monodoc 4.2-34.fc44 Β· MIT
- ubuntu jammy: gendarme 4.2-3.1
- ubuntu noble: gendarme 4.2-3.2
- Copyright (C) 2005-2006,2008-2009 Novell, Inc (http://www.novell.com)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms