Skip to content

Add ability to suppress individual BuildCheck diagnostics #10647

Open
@JanKrivanek

Description

@JanKrivanek

Context

BuildCheck doesn't have similar mechanism like #pragma warning disable for silencing the Roslyn analyzers.
This was decided to be out of scope for the V1 (https://github.com/dotnet/msbuild/blob/main/documentation/specs/BuildCheck/BuildCheck.md#out-of-scope).
With the limiting of the number of reports per Check (#10625) - users might get to a situation where they are unable to ignore unwanted diagnostics and see others.

Workaround

  • The reports throtling should be opt-out able (via Trait?)
  • In case of throttling, one can enable the rule in project per project - to prevent the throttling accross entire build

Note

This will need a design of how the suppressions will be performed and recognized (e.g. xml comments)

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