是否可以抑制 FxCop 中特定类的所有命名错误?
由于我无法控制的原因(它们是另一个系统的数据库,其成员遵循不同的命名约定),我必须创建一个包含十几个成员的类,每个成员都失败 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是 GenerateCodeAttribute 是自动生成代码的唯一方法镇压整个阶级。
Unfortunately the GeneratedCodeAttribute is the only way to automatically suppress an entire class.