c# - 如何抑制 stylecop 错误 SA1650(拼写错误的单词)

标签 c# documentation stylecop

我有一个类的文档标题,根据 stylecop,其中的单词拼写不正确。不过,它们是特定于代码的,需要存在。

Error SA1650 : CSharp.Documentation : The documentation text within the summary tag contains incorrectly spelled words: ...

我希望抑制错误。我该怎么做?

最佳答案

对我有用的解决方案是添加具有以下参数的 [SuppressMessage(...)] 属性:

// using System.Diagnostics.CodeAnalysis;

/// <summary>
/// ... documentation with misspelled words ...
/// </summary>
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed.")]
public class Program
{
    // ...
}

关于c# - 如何抑制 stylecop 错误 SA1650(拼写错误的单词),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44932175/

相关文章:

c# - 未按预期日期时间顺序输出的合并行列表

c# - 当我在 xamarin 表单中旋转内容页面时,我想设置适合屏幕的控件(图表)

ios - 如何创建目标、向该目标添加资源并使用 xcode 命令行工具构建目标?

python - 如何使用代码中的注释从 python 生成 swagger 规范文件 (json)?

c# - 防止代码清理在 Resharper 中创建文件头

stylecop - 为什么 StyleCop 规则不允许在代码中使用 #region?

c# - 插入字符串 c# 6.0 和 Stylecop

javascript - 按类模拟点击javascript到元素

c# - 使用 C++ dll 函数提高 C# 项目的性能

Qt 文档标准