gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 23:11:09 24 4
gpt4 key购买 nike

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

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com