是否可以抑制 FxCop 中特定类的所有命名错误?

发布于 2024-10-03 21:03:32 字数 299 浏览 0 评论 0原文

由于我无法控制的原因(它们是另一个系统的数据库,其成员遵循不同的命名约定),我必须创建一个包含十几个成员的类,每个成员都失败 3 到 4 个命名规则,更不用说方法了,这也需要违反相同规则的参数。因此,这会导致大约 80 个毫无意义且烦人的警告。

有什么办法(缺少 GenerateCodeAttribute)压制他们所有人?

Due to reasons beyond my control (them being a DB of another system whose members follow different naming conventions) I have to make a class with a dozen of members that each fail 3 to 4 naming rules each, not to mention methods, which also take parameters that break the same rules. As such this results in about 80 pointless and annoying warnings.

Is there any way (short of GeneratedCodeAttribute) to suppress them all?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

输什么也不输骨气 2024-10-10 21:03:32

不幸的是 GenerateCodeAttribute 是自动生成代码的唯一方法镇压整个阶级。

Unfortunately the GeneratedCodeAttribute is the only way to automatically suppress an entire class.

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