跳过 FxCop 中的内部类型分析
是否可以让 FxCop 忽略/跳过对给定程序集中的内部接口和类的分析?
我对向 FxCop 指定所有公共接口和类不感兴趣(因为仅分析这些)。这意味着每次添加新的公共类型时,我都必须转到 FxCop 的配置并添加此新类型。
Is it possible to have FxCop ignore/skip analyzing of internal interfaces and classes in a given assembly?
I'm not interested in specifying all public interfaces and classes to FxCop (as analyze only these). This would mean that every time a new public type is added I have to go to FxCop's configuration and add this new type.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
某些规则默认忽略非公共类型。但是,没有全局设置来阻止那些不执行非公共类型的设置,因此您几乎只能进行手动类型选择。
也就是说,我强烈建议您扭转您的方法并默认包含所有类型,手动排除您希望忽略的那些类型。这将防止您仅仅因为忘记将公共类型包含在分析中而错过公共类型中的问题。
Some rules ignore non-public types by default. However, there is no global setting for preventing those that do not from executing against non-public types, so you're pretty much stuck with your manual type selections.
That said, I would strongly recommend that you reverse your approach and include all types by default, manually excluding those types that you wish to ignore. This will prevent you from missing problems in a public type simply because you forgot to include it in analysis.