禁用StyleCop规则 [英] Disabling StyleCop rules
问题描述
我正在使用StyleCop.但是我想忽略一些规则,例如在类成员前面使用this.
.
如何关闭StyleCop规则.我看过了,但是找不到怎么做.
在StyleCop安装中,有一个Settings.StyleCop
文件.您可以编辑此选项以全局关闭规则.将该文件拖到该文件中的设置编辑器"可执行文件中,即可对其进行编辑.
您还可以将设置文件的副本放入项目中,以覆盖全局设置.
如果您使用的是Visual Studio集成,而不仅仅是MSBuild集成,则应该可以通过在项目上单击鼠标右键并选择StyleCop Settings
或类似的方法来进入每个项目的设置编辑器./p>
I'm using StyleCop. But there a couple of rules I want to ignore, for instance using this.
in front of class members.
How do I turn off a StyleCop rule. I've looked but can't find how to do it.
In your StyleCop install, there's a Settings.StyleCop
file. You can edit this to turn off rules globally. Drag that file onto the Settings Editor executable in that file to edit it.
You can also put copies of the settings file into your projects to override the global settings.
If you're using Visual Studio integration and not just MSBuild integration, you should be able to get to the settings editor on a per-project basis by right clicking on your project and choosing StyleCop Settings
or something like that.
这篇关于禁用StyleCop规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!