Resharper自定义插件严重性选项
本文关键字:选项 严重性 插件 自定义 Resharper | 更新日期: 2023-09-27 17:50:48
你好,我一直在做一个自定义的ReSharper插件,它几乎完成了。它用[StaticSeverityHighlighting(Severity.WARNING, "NonLocalizedStrings")]
突出显示指定的代码元素。我希望能够设置严重性,就像其他更尖锐的警告下的选项>代码检查>检查严重性。我要在哪里指定我希望检查显示为的名称和组?
[assembly: RegisterConfigurableSeverity(MakeMethodVirtualSuggestion.SeverityId,
"CSHARP",
HighlightingGroupIds.BestPractice,
"Non Localized String",
"All strings must be marked with either '// Not L10N' or localized to a resx file.",
Severity.WARNING,
false)]
修复了该程序集位于
命名空间之上的问题 [ConfigurableSeverityHighlighting("AccessToDisposedClosure", "CSHARP", OverlapResolve = OverlapResolveKind.WARNING, ToolTipFormatString = "Non Localized Strings")]
在类上使用ConfigurableSeverityHighlighting
解决了这个问题。再次感谢你,citizenmatt,你的git很有帮助