在整个项目或程序集中全局抑制代码分析警告 CA1704?

发布于 2024-08-25 08:00:30 字数 263 浏览 5 评论 0原文

我有几个想要抑制的代码分析 CA1704:IdentifiersShouldBeSpelledCorrectly 警告。基本上,它们指的是被认为拼写错误的公司名称。

公司名称是我项目中多个命名空间的一部分,为了抑制所有警告,我需要向 GlobalSuppressions 文件添加大量抑制。有没有办法将所有这些警告抑制在 GlobalSuppressions 文件中的一行中,以防止我的 GlobalSuppressions 文件变得过于混乱?

I have several Code Analysis CA1704:IdentifiersShouldBeSpelledCorrectly warnings that I want to suppress. Basically, they refer to the company name which is deemed to be spelled incorrectly.

The company name is part of several namespaces in my project, and in order to suppress all of the warnings I need to add a lot of suppressions to the GlobalSuppressions file. Is there any way to suppress all of these warnings in a single line in the GlobalSuppressions file to keep my GlobalSuppressions file from becoming overly cluttered?

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

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

发布评论

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

评论(2

舞袖。长 2024-09-01 08:00:30

您无法通过一次抑制来抑制许多警告,但当涉及到未知或故意的异常拼写时,最好的解决方案是添加 自定义代码分析字典

You can't suppress many warnings with a single suppression, but when it comes to unknown or deliberate deviant spelling, the best solution is to add a custom Code Analysis dictionary.

仅一夜美梦 2024-09-01 08:00:30

您可以将公司名称添加到 CustomDictionary.xml

You could add the company name to CustomDictionary.xml

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