-
Notifications
You must be signed in to change notification settings - Fork 458
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
Provide more flexibility in the SafeHandle constructor analyzer's visibility detection #5239
Provide more flexibility in the SafeHandle constructor analyzer's visibility detection #5239
Conversation
…ibility detection Allow internal constructors to be used on internal SafeHandle-derived types, and allow private protected constructors to be used on private protected SafeHandle-derived types. Fixes dotnet#5231 cc: @stephentoub
...crosoft.NetCore.Analyzers/InteropServices/ProvidePublicParameterlessSafeHandleConstructor.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Co-authored-by: Stephen Toub <stoub@microsoft.com>
…yn-analyzers into visibility-flexibility
...ft.NetCore.Analyzers/InteropServices/ProvidePublicParameterlessSafeHandleConstructorTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR should target main
since it's a false positive fix (in case the analyzer is already in main
- if it's not, then ignore the comment).
@mavasani Which branch should this PR target? release/6.0.1xx or main? I don't think I understand the process in this repo for determining which branch to target. |
@jkoritzinsky Please ignore my comment, the analyzer isn't in main. For the process question, I think it is that new analyzers are added to the next release branch (to avoid breaking changes). |
Codecov Report
@@ Coverage Diff @@
## release/6.0.1xx #5239 +/- ##
================================================
Coverage 95.60% 95.60%
================================================
Files 1236 1236
Lines 283895 283949 +54
Branches 17032 17036 +4
================================================
+ Hits 271414 271469 +55
Misses 10179 10179
+ Partials 2302 2301 -1 |
@dotnet/roslyn-analysis for review |
I do not have permission to merge, so can someone merge this for me when it has been sufficiently reviewed/approved? |
@jkoritzinsky is this ready to merge? |
As far as I know this is ready for merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM merging
Allow internal constructors to be used on internal SafeHandle-derived types, and allow private protected constructors to be used on private protected SafeHandle-derived types.
Fixes #5231
cc: @stephentoub