-
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
Do not warn when invoking APIs that has SupportedOSPlatformGuard attribute #7326
Conversation
@sharwell there is something broke in the repo, normal build succeeds but
|
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.
Not an expert here though.
Turns out .NET version I was using was higher than the repo version, after the versions sync |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7326 +/- ##
==========================================
- Coverage 96.49% 96.49% -0.01%
==========================================
Files 1443 1443
Lines 345592 345670 +78
Branches 11370 11370
==========================================
+ Hits 333484 333550 +66
- Misses 9230 9241 +11
- Partials 2878 2879 +1 |
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.
The source changes look good, but I wonder if we should have additional test cases.
...ft.NetCore.Analyzers/InteropServices/PlatformCompatibilityAnalyzerTests.GuardedCallsTests.cs
Show resolved
Hide resolved
...ft.NetCore.Analyzers/InteropServices/PlatformCompatibilityAnalyzerTests.GuardedCallsTests.cs
Show resolved
Hide resolved
...ft.NetCore.Analyzers/InteropServices/PlatformCompatibilityAnalyzerTests.GuardedCallsTests.cs
Show resolved
Hide resolved
...tAnalyzers/Core/Microsoft.NetCore.Analyzers/InteropServices/PlatformCompatibilityAnalyzer.cs
Show resolved
Hide resolved
Added additional tests, thanks! |
@buyaa-n do you know when this will be available in runtime repo? Or could you let me know when the time comes? |
Must be it dotnet/runtime#103473 |
Works like charm, thank you! |
Do not warn when invoking Guard APIs that has SupportedOSPlatformGuard attribute
Fixes issue @ManickaP encountered on https://github.com/dotnet/runtime/compare/main...ManickaP:runtime:quic-platform-guard?expand=1
Added unit test that reproes the issue
Repro:
The Guard API used from another assembly, should not warn on
QuicConnection.IsSupported
invocation