Skip to content

IDE0079 configuration not respected #81078

@pi3k14

Description

@pi3k14

Version Used:
Visual Studio 2026 Insiders 11201.2

Steps to Reproduce:

Test.cs

namespace What;

public class Test
{
#pragma warning disable IDE0051
    readonly int UsedNow = 5;
#pragma warning restore IDE0051
    public int Used() => UsedNow;
}

.editorconfig

[*.cs]
dotnet_remove_unnecessary_suppression_exclusions = none
dotnet_diagnostic.IDE0079.severity = warning

Expected Behavior:

A warning in the IDE about unnecessary suppression

Actual Behavior:
No warning

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions