宪兵忽略列表格式

时间:2011-04-07 09:17:18

标签: visual-studio-2008 mono gendarme

我正在开发一个C#解决方案,我正在使用与Visual Studio集成的Gendarme,以便在编译时输出到错误列表窗口。

我可以在Gendarme的源代码和文档中看到,你可以指定一个忽略列表,让Gendarme忽略一个程序集中的某些类,但我不能在我的生活中找到任何在线文档,显示一个例子该文件所需的格式。

有人可以帮忙吗?

2 个答案:

答案 0 :(得分:4)

这很简单,你可以在self-test.ignore文件中找到一个例子。 基本忽略规则格式如下:

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
...

您可能还希望查看忽略文件parsing code

答案 1 :(得分:1)

此链接描述了格式并且还有一个有用的注释: http://manpages.ubuntu.com/manpages/oneiric/man5/gendarme.5.html

  

可以从XML自动生成ignore文件(使用gd2i)          Gendarme制作的缺陷清单。