Resharper自定义插件严重性选项

时间:2014-03-18 22:49:00

标签: c# resharper resharper-8.0

您好我一直致力于自定义ReSharper插件,这几乎已经完成了。它使用[StaticSeverityHighlighting(Severity.WARNING, "NonLocalizedStrings")]突出显示指定的代码元素。我希望能够像选项>中的其他resharper警告一样设置严重性。代码检查>检查严重程度。我在哪里指定名称和组我希望我的检查显示为。

1 个答案:

答案 0 :(得分:5)

    [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非常有帮助