Skip to content

New analyzer API (DiagnosticSuppressor) is not supported #1711

@sailro

Description

@sailro

I'm using a pack of Roslyn Analyzers built from:
https://github.com/microsoft/Microsoft.Unity.Analyzers

On a Unity project (Game engine) available here:
https://learn.unity.com/project/roll-a-ball-tutorial

When using Visual Studio:
image

When using VSCode:
image

Omnisharp is able to correctly consume regular Analyzers (see UNT0009). But Diagnostic suppressors are not supported:

"Private member 'ReadmeEditor.Awake' is unused. [Assembly-CSharp-Editor]"

This message is correctly suppressed in the VS context, but not within VSCode.

The code for this suppressor is here:
https://github.com/microsoft/Microsoft.Unity.Analyzers/blob/master/src/Microsoft.Unity.Analyzers/UnusedMessageSuppressor.cs

The Roslyn team added a new API regarding programmatic suppression of diagnostics:
dotnet/roslyn#36067

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions