-
Notifications
You must be signed in to change notification settings - Fork 457
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
VB support for the virtual methods in DetectPreviewFeatureAnalyzer #5566
Conversation
Codecov Report
@@ Coverage Diff @@
## release/6.0.1xx #5566 +/- ##
===================================================
- Coverage 95.53% 95.53% -0.01%
===================================================
Files 1275 1275
Lines 291033 292698 +1665
Branches 17569 17701 +132
===================================================
+ Hits 278046 279624 +1578
- Misses 10599 10649 +50
- Partials 2388 2425 +37 |
...alyzers/VisualBasic/Microsoft.NetCore.Analyzers/Runtime/BasicDetectPreviewFeatureAnalyzer.vb
Show resolved
Hide resolved
The original description by @pgovind:
Now the PR is ready for review @jeffhandley |
...alyzers/VisualBasic/Microsoft.NetCore.Analyzers/Runtime/BasicDetectPreviewFeatureAnalyzer.vb
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.
Thanks for catching the C# location issue while doing this. I left a couple comments but I think they may be related to the issue you filed.
...lyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/DetectPreviewFeatureTests.Interfaces.cs
Outdated
Show resolved
Hide resolved
...alyzers/VisualBasic/Microsoft.NetCore.Analyzers/Runtime/BasicDetectPreviewFeatureAnalyzer.vb
Outdated
Show resolved
Hide resolved
...lyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/DetectPreviewFeatureTests.Interfaces.cs
Outdated
Show resolved
Hide resolved
...lyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/DetectPreviewFeatureTests.Properties.cs
Show resolved
Hide resolved
...alyzers/VisualBasic/Microsoft.NetCore.Analyzers/Runtime/BasicDetectPreviewFeatureAnalyzer.vb
Show resolved
Hide resolved
...lyzers/UnitTests/Microsoft.NetCore.Analyzers/Runtime/DetectPreviewFeatureTests.Interfaces.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.
Thanks! This has been approved by tactics for 6.0 GA as well.
EDIT: The original description moved to below comment
Customer Impact
With #5425, we have improved the diagnostics locations for fields/events, inheritance from preview types, method parameters, generic type parameters etc as proposed in dotnet/runtime#57224. But the implementation done only for C#, this PR has the VB implementation. By taking the VB improvement as well, we’ll align the VB and C# behavior such that the reference to the preview API will be flagged instead of flagging the symbol that consumes that reference.
With this PR we have added
Without this change,
Lets assume we have following class, interfaces
Example of current diagnostic location:
Desired/updated location:
Testing
Unit tests added for VB, not only for the related code change, also added smoke tests for overall functionality
Risk
Minimal. This PR only adding test for VB plus improving the diagnostics locations. It will not introduce new warnings. There is very little chance that it could bread the build when the diagnostics are suppressed in the old location and with this change they could see the warning in different location.