跳过 FxCop 中的内部类型分析

发布于 2024-09-11 09:09:23 字数 125 浏览 1 评论 0原文

是否可以让 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

天涯离梦残月幽梦 2024-09-18 09:09:23

某些规则默认忽略非公共类型。但是,没有全局设置来阻止那些不执行非公共类型的设置,因此您几乎只能进行手动类型选择。

也就是说,我强烈建议您扭转您的方法并默认包含所有类型,手动排除您希望忽略的那些类型。这将防止您仅仅因为忘记将公共类型包含在分析中而错过公共类型中的问题。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文