我有一个类的文档标题,根据 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/