如何在 Visual Studio 中禁用自定义分析器的分析器抑制?
How can i disable analyzer suppression for custom analyzers in VisualStudio?
与许多寻求禁用分析器警告的请求相反,我在这里尝试一些不同的东西 - 我编写了一个 ConfigureAwait-Analyzer,以强制开发人员在工具库中指定 configureawait 以防止异步死锁。
分析器属于 "Error" 类别而不是警告 - 只有一个特定问题。 VisualStudio 提供抑制此分析器,我显然不想成为错误的选项。
我如何影响(关闭)这种行为?
private static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Error,
isEnabledByDefault: true,
description: Description,
customTags: new[] { WellKnownDiagnosticTags.NotConfigurable });
与许多寻求禁用分析器警告的请求相反,我在这里尝试一些不同的东西 - 我编写了一个 ConfigureAwait-Analyzer,以强制开发人员在工具库中指定 configureawait 以防止异步死锁。
分析器属于 "Error" 类别而不是警告 - 只有一个特定问题。 VisualStudio 提供抑制此分析器,我显然不想成为错误的选项。
我如何影响(关闭)这种行为?
private static DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Error,
isEnabledByDefault: true,
description: Description,
customTags: new[] { WellKnownDiagnosticTags.NotConfigurable });