您要停用 FxCop 的哪条规则?

发布于 2024-07-07 22:26:00 字数 80 浏览 7 评论 0原文

我个人还没有使用 FxCop。 我们希望在进行代码分析之前先完成单元测试。 但是,您会永久停用哪些规则? 在什么情况下您会暂时停用哪些规则?

I personally don't use FxCop yet. We want to work out the unit testing first before going with code analysis. However, which rules would you permanantly deactivate? Which rules would you deactivate temporarily and in which situation?

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

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

发布评论

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

评论(5

夜唯美灬不弃 2024-07-14 22:26:00

我不喜欢规则 CA1021:避免使用 out 参数。 输出参数对于许多不同的模式都很有用(包括 .Net Try* 模式)。 Out 当然可能会被过度使用,但实际上为其制定 FxCop 规则似乎有些过分了。

规则 CA1021

I dislike rule CA1021: Avoid out parameters. Out parameters are useful for many different patterns (including the .Net Try* pattern). Out can certainly be overused but really it seems overkill to have an FxCop rule for it.

Rule CA1021

蓝咒 2024-07-14 22:26:00

我不使用禁止方法/事件名称中使用下划线的命名约定规则。 我已经习惯了“Button1_Click”。 Visual Studio 会自动插入下划线,因此您必须手动删除它们。 我只是觉得让他们一个人呆着更容易。 而且,我在创建方法/事件时添加下划线。

I don't use the naming convention rule that prohibits underscores in method/event names. I've gotten used to "Button1_Click". Visual Studio automatically inserts the underscores, so you have to manually remove them. I just think it's easier to leave them alone. And, I add the underscore when I create a method/event.

浅浅 2024-07-14 22:26:00

根据您正在构建的系统,您需要关闭一整套迂腐的废话。
我建议检查 FxCop 输出并自行决定。 一个人的迂腐是另一个人“必须具备的”。

There's a whole list of pedantic crap you'll want to turn off depending on the system you're building.
I'd suggest examining the FxCop output and deciding yourself. One mans pedantry is anothers "must have".

秋叶绚丽 2024-07-14 22:26:00

它抱怨“ID”并建议“Id”......即使遵循“两个字符缩写全部大写”规则:O)

It complains about "ID" and suggests "Id"... even though that follows the "two-character-abbreviations-are-all-capped" rule :O)

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