Mergeable if statements should be combined - RSPEC-S1066#734
Mergeable if statements should be combined - RSPEC-S1066#734olwispe wants to merge 13 commits intoopenrewrite:mainfrom
if statements should be combined - RSPEC-S1066#734Conversation
timtebeek
left a comment
There was a problem hiding this comment.
Great to see @olwispe ! Added some light polish and I've been looking at the changes at scale.
Looking at these two examples I wonder if perhaps we should move the inner if conditional to a new line, and keep the comments in more of their original position.
I've pushed a quick test update that shows a comment lost. What are your thoughts to the above proposal?
|
Thanks for your comments. |
src/main/java/org/openrewrite/staticanalysis/CombineMergeableIfStatements.java
Outdated
Show resolved
Hide resolved
|
This PR is stale because it has been open for 90 days with no activity. Remove |
src/main/java/org/openrewrite/staticanalysis/CombineMergeableIfStatements.java
Show resolved
Hide resolved
src/main/java/org/openrewrite/staticanalysis/CombineMergeableIfStatements.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/staticanalysis/CombineMergeableIfStatements.java
Show resolved
Hide resolved
src/main/java/org/openrewrite/staticanalysis/CombineMergeableIfStatements.java
Show resolved
Hide resolved
|
Hi @timtebeek! |
…fStatements.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…fStatements.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…fStatements.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2018f25 to
f0c659e
Compare
What's changed?
This PR implements RSPEC-S1066 which was requested in :
ifstatements should be merged.RSPEC-1066#45What's your motivation?
Among others, help migrate to pattern matching for
instanceofwhen combined withorg.openrewrite.staticanalysis.InstanceOfPatternMatch:Anything in particular you'd like reviewers to focus on?
Anyone you would like to review specifically?
@timtebeek
Have you considered any alternatives or workarounds?
Any additional context
Checklist