Simplify Ternary expressions [#203]#231
Merged
timtebeek merged 7 commits intoopenrewrite:mainfrom Jan 8, 2024
Merged
Conversation
Member
|
Thanks for starting this one! I've added two new cases to the tests to check handling on negation. Without the parentheses in the after template we could end up only negating the first boolean in a binary, changing the logic. I'm not yet pleased with the left over parentheses, but think we might need to fix that in rewrite-templating first. |
This was referenced Jan 2, 2024
Member
|
After fixes in rewrite-templating and rewrite it appears we now need a fix in rewrite-kotlin before we can get this one through. Thanks for your patience! :) |
3 tasks
timtebeek
approved these changes
Jan 8, 2024
Member
timtebeek
left a comment
There was a problem hiding this comment.
Thanks for the help in seeing this through! Quite some fixes and enhancements that will help other cases as well, so very useful adding this here.
timtebeek
reviewed
Jan 8, 2024
timtebeek
reviewed
Jan 8, 2024
Closed
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's changed?
Simplify ternary expressions (closes #203)
What's your motivation?
Explore
rewrite-templatingAnything in particular you'd like reviewers to focus on?
No
Anyone you would like to review specifically?
No one
Have you considered any alternatives or workarounds?
No
Any additional context
Requires changes provided by openrewrite/rewrite#3861
Checklist