【发布时间】:2011-01-28 15:54:08
【问题描述】:
我在我的 c# 文件中使用 XML 文档标头来传递 StyleCop 规则 SA1633。
目前,我必须使用 2 斜杠注释规则来让 StyleCop 识别标题。例如:
// <copyright file="abc.ascx.cs" company="MyCompany.com">
// MyCompany.com. All rights reserved.
// </copyright>
// <author>Me</author>
这适用于 StyleCop,但是我想使用 3 斜线注释规则使 Visual Studio 能够将 cmets 理解为 XML 并提供 XML 功能(突出显示、自动缩进等)
/// <copyright file="abc.ascx.cs" company="MyCompany.com">
/// MyCompany.com. All rights reserved.
/// </copyright>
/// <author>Me</author>
问题是当使用 3 个斜线时,StyleCop 不再看到标题并抛出 SA1633 警告。
无论如何配置 stylecop 以使用 3 个斜杠理解标头包含在 XML 中?
【问题讨论】:
-
我只能找到关于标题格式以及如何配置其中的元素的文档,而不是评论本身的格式。
标签: c# .net stylecop coding-style