Domanda

Hello I've been working on a custom ReSharper plugin which is almost done. It highlights specified code elements with [StaticSeverityHighlighting(Severity.WARNING, "NonLocalizedStrings")]. I would like to be able to set the severity just like other resharper warnings under Options > Code Inspection > Inspection Severity. Where would I specify the name and group I'd like my inspection to show up as.

È stato utile?

Soluzione

    [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)]

Fixed with this assembly above the namespace

 [ConfigurableSeverityHighlighting("AccessToDisposedClosure", "CSHARP", OverlapResolve = OverlapResolveKind.WARNING, ToolTipFormatString = "Non Localized Strings")]

Using ConfigurableSeverityHighlighting on class fixes the problem. Thank you again citizenmatt your git is very helpful

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top