Skip to content

Instantly share code, notes, and snippets.

View mavasani's full-sized avatar

Manish Vasani mavasani

View GitHub Profile
@mavasani
mavasani / DiagnosticSuppressorDesign.md
Last active September 4, 2019 00:57
DiagnosticSuppressor

Feature Request

dotnet/roslyn#30172: Programmatic suppression of warnings

Provide an ability for platform/library authors to author simple, context-aware compiler extensions to programmatically suppress specific instances of reported analyzer and/or compiler diagnostics, which are always known to be false positives in the context of the platform/library.

Programmatically Suppressible Diagnostic

An analyzer/compiler diagnostic would be considered a candidate for programmatic suppression if all of the following conditions hold:

  1. Not an error by default: Diagnostic's DefaultSeverity is not DiagnosticSeverity.Error.