You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dotnet/runtime#35339 is adding a UnconditionalSuppressMessageAttribute that is pretty much the same thing as SuppressMessageAttribute, except it's not conditioned on CODE_ANALYSIS.
The purpose of the attribute is to allow suppression of messages from IL-level tools that operate on the whole program as opposed to source code (IL Linker being the main target for .NET 5).
The existing SuppressMessageAttribute doesn't typically get preserved into IL metadata since all the existing use cases for it are for source compilers only - it seems like it's desirable for it to stay like that.
It would be nice if Roslyn treated UnconditionalSuppressMessageAttribute same as SuppressMessageAttribute, since we're expecting there's going to be an overlap (the things that IL Linker is going to warn about in .NET 5 are also great candidates for Roslyn analyzers and code fixes). We cannot go with an analyzer-only approach for this though because Linker is analyzing code and generating warnings for e.g. NuGet packages too.
dotnet/runtime#35339 is adding a
UnconditionalSuppressMessageAttribute
that is pretty much the same thing asSuppressMessageAttribute
, except it's not conditioned onCODE_ANALYSIS
.The purpose of the attribute is to allow suppression of messages from IL-level tools that operate on the whole program as opposed to source code (IL Linker being the main target for .NET 5).
The existing
SuppressMessageAttribute
doesn't typically get preserved into IL metadata since all the existing use cases for it are for source compilers only - it seems like it's desirable for it to stay like that.It would be nice if Roslyn treated
UnconditionalSuppressMessageAttribute
same asSuppressMessageAttribute
, since we're expecting there's going to be an overlap (the things that IL Linker is going to warn about in .NET 5 are also great candidates for Roslyn analyzers and code fixes). We cannot go with an analyzer-only approach for this though because Linker is analyzing code and generating warnings for e.g. NuGet packages too.Cc @vitek-karas
The text was updated successfully, but these errors were encountered: