Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to suppress individual BuildCheck diagnostics #10647

Open
JanKrivanek opened this issue Sep 11, 2024 · 1 comment
Open

Add ability to suppress individual BuildCheck diagnostics #10647

JanKrivanek opened this issue Sep 11, 2024 · 1 comment
Labels
10.0 Area: BuildCheck needs-design Requires discussion with the dev team before attempting a fix. triaged

Comments

@JanKrivanek
Copy link
Member

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)

@JanKrivanek JanKrivanek added needs-design Requires discussion with the dev team before attempting a fix. Area: BuildCheck 10.0 labels Sep 11, 2024
@KalleOlaviNiemitalo
Copy link

e.g. xml comments

Or processing instructions, if those are ignored by older versions of MSBuild.

@AR-May AR-May added the triaged label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.0 Area: BuildCheck needs-design Requires discussion with the dev team before attempting a fix. triaged
Projects
None yet
Development

No branches or pull requests

3 participants