抑制 stylecop 文件头警告消息

发布于 2024-12-11 01:26:54 字数 106 浏览 1 评论 0 原文

我们使用 StyleCop,它检查每个源文件是否具有我们的版权标头。这很好,直到我添加一个带有自己的标头的开源文件,而现在两者是冲突的。如何关闭 Stylecop 对项目中特定文件和消息类型的检查?

we use StyleCop and it checks whether each source file has our copyright header. This is fine till I add an opensource file with its own header, and the two now are conflicting. How can I turn off Stylecop check for particular files and messagetypes in project?

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

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

发布评论

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

评论(1

溺ぐ爱和你が 2024-12-18 01:26:54

如果您希望 StyleCop 完全忽略这些文件,您可以在 .csproj 文件中添加 ExcludeFromStyleCop 元素,如 http://stylecop.codeplex.com/wikipage?title=使用%20StyleCop%20on%20Legacy%20Projects

如果您只想停用这些文件的某些规则,可以通过将 SourceFileList 部分添加到您的 StyleCop.settings 文件中来完成,如 http://stylecop.codeplex.com/wikipage?title=使用%20File%20Lists

If you want StyleCop to completely ignore these files, you can add ExcludeFromStyleCop elements within your .csproj file as described at http://stylecop.codeplex.com/wikipage?title=Using%20StyleCop%20on%20Legacy%20Projects.

If you want to deactivate only certain rules for these files, this can be done by adding a SourceFileList section to your StyleCop.settings files as described at http://stylecop.codeplex.com/wikipage?title=Using%20File%20Lists.

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