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

Add GetLeftSideOfDot from Roslyn #6863

Open
Tim-Pohlmann opened this issue Mar 6, 2023 · 0 comments
Open

Add GetLeftSideOfDot from Roslyn #6863

Tim-Pohlmann opened this issue Mar 6, 2023 · 0 comments
Labels
Type: Cleanup Improve and cleanup code base

Comments

@Tim-Pohlmann
Copy link
Contributor

Tim-Pohlmann commented Mar 6, 2023

GetLeftSideOfDot would be very useful in a lot of places and should be brought over to our code base.

Example use case:

ExpressionSyntax CollectionExpression() =>
methodSymbol.MethodKind is MethodKind.ReducedExtension
? invocation.Expression switch
{
MemberAccessExpressionSyntax { Expression: { } memberAccessExpression } => memberAccessExpression,
MemberBindingExpressionSyntax => invocation.GetParentConditionalAccessExpression().Expression,
_ => null
}
: invocation.ArgumentList.Arguments.FirstOrDefault()?.Expression;

@Tim-Pohlmann Tim-Pohlmann added Type: Improvement Area: C# C# rules related issues. labels Mar 6, 2023
@Tim-Pohlmann Tim-Pohlmann added the Sprint: Hardening Fix FPs/FNs/improvements label Apr 9, 2024
@Tim-Pohlmann Tim-Pohlmann modified the milestone: 9.24 Apr 9, 2024
@Tim-Pohlmann Tim-Pohlmann added Area: VB.NET VB.NET rules related issues. and removed Area: VB.NET VB.NET rules related issues. Area: C# C# rules related issues. Sprint: Hardening Fix FPs/FNs/improvements labels Apr 17, 2024
@pavel-mikula-sonarsource pavel-mikula-sonarsource added Type: Cleanup Improve and cleanup code base and removed Type: Improvement labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Cleanup Improve and cleanup code base
Projects
None yet
Development

No branches or pull requests

2 participants