有没有办法绕过 CA1726:UsePreferredTerms?
I have a problem with the code analysis rule CA1726:UsePreferredTerms. Our business domain has two crucial concepts named Case
and Flag
. According to CA, it's apparently a deadly sin to use these names, however I really don't care since, as I said, they are crucial concepts in our domain model. CA complains not only about the type declarations but about every method parameter-name aswell. So does anyone know if there is a workaround other than adding loads of suppressions or disabling the rule altogether? Could I add the names to a custom dictionary?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议将这些名称添加到自定义词典中作为您的第一次努力,是的。这是一件非常简单的事情,我必须为我为各种问题领域术语所做的每个重要项目添加一个自定义字典。
I would suggest adding the names to a custom dictionary as your first ditch effort, yes. It's a dead-simple thing to do, and I've had to add a custom dictionary for every single non-trivial project that I've worked on for various problem-domain terms.