我可以在 StyleCop 中创建自定义规则而无需编写任何代码吗?

发布于 2024-08-10 18:16:01 字数 51 浏览 5 评论 0原文

有人可以确认或否认我可以通过修改某些配置文件来修改 StyleCop 提供的默认样式吗?

Can anybody confirm or deny that I can modify default styles provided by StyleCop by just modifying some configuration file?

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

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

发布评论

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

评论(2

憧憬巴黎街头的黎明 2024-08-17 18:16:01

您可以禁用规则,但如果您想检查自定义样式,则必须编写自己的规则。您可以阅读StyleCop的API帮助文件。

You can disable rules but if you want to check a custom style, you will have to code your own rules. You may read the API help file of StyleCop.

或十年 2024-08-17 18:16:01

创建新规则需要一些 C# 代码。请参阅此处此处了解一些有关自定义规则创建的文章。

您可以使用配置文件启用/禁用现有规则。 Stylecop 附带 StyleCopSettingsEditor.exe,可用于编辑/生成 xml 配置文件以配置将运行的规则。有关如何禁用特定规则的信息,请参阅此问题

Creation of new rules requires some C# code. See here and here for some articles on custom rule creation.

You can enable/disable the existing rules with a configuration file. Stylecop comes with the StyleCopSettingsEditor.exe which can be used to edit/generate a xml config file to configure which rules will be run. See this question on how to disable specific rules.

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