-
Notifications
You must be signed in to change notification settings - Fork 468
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
Not effective - CA2200: Rethrow to preserve stack details #6284
Comments
Interesting, we do have an existing test for this same scenario: Lines 141 to 166 in 2928b85
But the analyzer is not firing on the same code snippet. I am wondering if this is due to a change in Operation tree shape that the analyzer expects. I'll investigate. |
The issue seems to be that starting C# 8, the operation tree shape for |
Will this fix be included in the next .NET 7 SDK release? |
No, this would go into .NET 8, especially given this is about false negatives and not false positives. You should be able to get the analyzer NuGet package with this fix from the dotnet public package feed. |
Analyzer
Diagnostic ID: CA2200:
Rethrow to preserve stack details
Version: [SDK 7.0.100]
Describe the bug
dotnet build
or the build action in Visual Studio for Mac didn't show the warning of CA2200.Steps To Reproduce
dotnet new console -o TestConsoleApp
Content of the .csproj file
Expected behavior
Warning should be reported that CA2200 was found.
Actual behavior
No warnings reported.
Additional context
.NET SDK: 7.0.100
OS: MacOS Ventura
The text was updated successfully, but these errors were encountered: