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
Currently the BannedApiAnalyzer processes generated code that the developer has little control over.
It would be very helpful if the analyzer could optionally ignore code marked with GeneratedCodeAttribute.
An alternative here would be to ignore entry points. The code that's being triggered is a non-async Main method using .GetAwaiter().GetResult(), which is exactly what the compiler does when translating an async Main to generate the required non-async Main.
We are also willing to add GeneratedCodeAttribute to the class in question if that helps.
Currently the BannedApiAnalyzer processes generated code that the developer has little control over.
It would be very helpful if the analyzer could optionally ignore code marked with GeneratedCodeAttribute.
The analysis framework seems to have some functionality in place to ignore generated code.
https://learn.microsoft.com/en-us/dotnet/api/microsoft.codeanalysis.diagnostics.generatedcodeanalysisflags?view=roslyn-dotnet-4.9.0
The text was updated successfully, but these errors were encountered: