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

Added test for RCS1196 #1235

Merged
merged 10 commits into from
Nov 20, 2023
Merged

Added test for RCS1196 #1235

merged 10 commits into from
Nov 20, 2023

Conversation

jakubreznak
Copy link
Contributor

added test for RCS1196
resolve #1128

I tested it and there were no redundant parentheses. I also wrote test for it.

@josefpihrt
Copy link
Collaborator

I took a look at it and I turned out that the problem is with the refactoring which has the same functionality as the analyzer:

context.RegisterRefactoring(
CallExtensionMethodAsInstanceMethodRefactoring.Title,
ct =>
{
return context.Document.ReplaceNodeAsync(
analysis.InvocationExpression,
analysis.NewInvocationExpression,
ct);
},
RefactoringDescriptors.CallExtensionMethodAsInstanceMethod);

@josefpihrt
Copy link
Collaborator

@jakubreznak Could you fix it?

@jakubreznak
Copy link
Contributor Author

Yeah, sorry, i will look at it, but I am not able to do it this week.

@jakubreznak
Copy link
Contributor Author

I looked at it and fixed it, also added a test. Thank you for your suggestion.

ChangeLog.md Outdated Show resolved Hide resolved
@josefpihrt josefpihrt merged commit 695c814 into dotnet:main Nov 20, 2023
15 checks passed
@josefpihrt
Copy link
Collaborator

@jakubreznak Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redundant parentheses in "Call extension method as instance method"
2 participants