Skip to content
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

CA1311 various fixes #6010

Merged
merged 3 commits into from
May 27, 2022
Merged

Conversation

TKharaishvili
Copy link
Contributor

This PR is a follow-up of these two - #5970 #2186

@buyaa-n @Youssef1313 Here's the new PR addressing the issues left over from the previous ones.
I've updated the fixer to address the VB edge case and I've also fixed the typo in the resource files.
I haven't however moved unit tests into a single file. Is that a must? I see that many analyzers/fixers in the codebase have separate files for unit tests.

Comment on lines +18 to +21
Dim invocation = DirectCast(node, InvocationExpressionSyntax)
If invocation.Expression.IsKind(SyntaxKind.SimpleMemberAccessExpression) Then
Return DirectCast(invocation.Expression, MemberAccessExpressionSyntax).Name.GetLocation()
End If
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Dim invocation = DirectCast(node, InvocationExpressionSyntax)
If invocation.Expression.IsKind(SyntaxKind.SimpleMemberAccessExpression) Then
Return DirectCast(invocation.Expression, MemberAccessExpressionSyntax).Name.GetLocation()
End If
node = DirectCast(node, InvocationExpressionSyntax).Expression

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why @Youssef1313 suggested this

@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #6010 (2951a71) into main (04edea1) will increase coverage by 0.00%.
The diff coverage is 89.91%.

@@           Coverage Diff            @@
##             main    #6010    +/-   ##
========================================
  Coverage   96.03%   96.03%            
========================================
  Files        1330     1330            
  Lines      306571   306672   +101     
  Branches     9722     9729     +7     
========================================
+ Hits       294426   294527   +101     
+ Misses       9796     9792     -4     
- Partials     2349     2353     +4     

…me/BasicSpecifyCultureForToLowerAndToUpper.vb

Co-authored-by: Youssef Victor <youssefvictor00@gmail.com>
Copy link
Contributor

@buyaa-n buyaa-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix @TKharaishvili and thanks for pointing it out @Youssef1313

@buyaa-n buyaa-n merged commit 2da2b2f into dotnet:main May 27, 2022
@github-actions github-actions bot added this to the vNext milestone May 27, 2022
@TKharaishvili TKharaishvili deleted the CA1311-various-fixes branch June 3, 2022 12:00
@jmarolf jmarolf modified the milestones: vNext, .NET 7.x Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants