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
In my project, I never suppress even with #pragma, instead I do it with my .editorconfig.
Likewise I also use other analyzers which the source generated pinvoke's might warn on and not suppress at all on so then I might then have to change the warning level on them anyways inside of my .editorconfig.
So ye at this rate we might as well have an option to opt-out of suppressing warnings inside of the source generated files to prefer our settings in our .editorconfig.
The text was updated successfully, but these errors were encountered:
Analyzers shouldn't usually run on generated code anyway. If you have analyzers that do, that might be a bug in the analyzer that's worth filing against them.
We suppress warnings within the generated files that are actually emitted by the compiler itself, as we never want the compiler to emit warnings to the user for code we generate, particularly when we know it's either not a problem, or one we will take care of. We don't want users to have to suppress the warnings themselves, especially if that suppression might apply project-wide.
You're welcome to suppress anything you want in your project, of course, but adding a feature to remove the source-level suppressions from the generated code would add complexity to the generator with little or no real benefit to the user.
In my project, I never suppress even with
#pragma
, instead I do it with my.editorconfig
.Likewise I also use other analyzers which the source generated pinvoke's might warn on and not suppress at all on so then I might then have to change the warning level on them anyways inside of my
.editorconfig
.So ye at this rate we might as well have an option to opt-out of suppressing warnings inside of the source generated files to prefer our settings in our
.editorconfig
.The text was updated successfully, but these errors were encountered: