-
Notifications
You must be signed in to change notification settings - Fork 356
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
Remove redundant space for DeleteMethodArgument when argumentIndex=0 #4677
Conversation
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.
Some suggestions could not be made:
- rewrite-gradle/src/test/java/org/openrewrite/gradle/search/FindPluginsTest.java
- lines 72-72
Signed-off-by: kuchang <[email protected]>
57057fd
to
b138330
Compare
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.
Some suggestions could not be made:
- rewrite-gradle/src/test/java/org/openrewrite/gradle/search/FindPluginsTest.java
- lines 72-72
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 @ckcd ! Indeed looks better when there's no leading space after removing the first element. I've pushed up a very small change to assume the prefix used previously, with an additional test class that shows when that would help here. With that we're good to merge here.
…penrewrite#4677) * Remove redundant space for DeleteMethodArgument when argumentIndex=0 Signed-off-by: kuchang <[email protected]> * Update FindPluginsTest.java * Adopt prefix of removed element --------- Signed-off-by: kuchang <[email protected]> Co-authored-by: Tim te Beek <[email protected]>
What's changed?
Below case will failed because it will change to
"public class A {{ B.foo( 1, 2); }}"
which contains a redundant space before the first argument.correct answer:
"public class A {{ B.foo(1, 2); }}"
, no space before the first1
element.actual answer:
"public class A {{ B.foo( 1, 2); }}"
has a redundant space before the first1
element.This PR aims to fix the issue.
What's your motivation?
Fix #4676
Checklist