Skip to content

[CodeQuality] Handle deep comments merged on ShortenElseIfRector #3419

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

Merged
merged 6 commits into from
Feb 26, 2023

Conversation

samsonasik
Copy link
Member

Closes #3413

kkmuffme and others added 4 commits February 27, 2023 02:13

Verified

This commit was signed with the committer’s verified signature.
samsonasik Abdul Malik Ikhsan
# Failing Test for ShortenElseIfRector

Based on https://getrector.com/demo/9434743e-4ebc-45d9-a12f-694c87d6e4db

The issue is that this rector rule puts EVERY comment found anywhere inside the if (or elseif or else) inside, on top of the newly created elseif, creating a major mess.

Verified

This commit was signed with the committer’s verified signature.
samsonasik Abdul Malik Ikhsan

Verified

This commit was signed with the committer’s verified signature.
samsonasik Abdul Malik Ikhsan

Verified

This commit was signed with the committer’s verified signature.
samsonasik Abdul Malik Ikhsan
Fix

Verified

This commit was signed with the committer’s verified signature.
samsonasik Abdul Malik Ikhsan

Verified

This commit was signed with the committer’s verified signature.
samsonasik Abdul Malik Ikhsan
@samsonasik samsonasik enabled auto-merge (squash) February 26, 2023 19:36
@samsonasik samsonasik merged commit b7b3a1d into main Feb 26, 2023
@samsonasik samsonasik deleted the close-3413 branch February 26, 2023 19:39
samsonasik added a commit that referenced this pull request May 8, 2023

Verified

This commit was signed with the committer’s verified signature.
samsonasik Abdul Malik Ikhsan
* Add failing test fixture for ShortenElseIfRector

# Failing Test for ShortenElseIfRector

Based on https://getrector.com/demo/9434743e-4ebc-45d9-a12f-694c87d6e4db

The issue is that this rector rule puts EVERY comment found anywhere inside the if (or elseif or else) inside, on top of the newly created elseif, creating a major mess.

* rename fixture

* fixture space

* Closes #3413

* Fix

* cs fix

---------

Co-authored-by: kkmuffme <11071985+kkmuffme@users.noreply.github.com>
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.

None yet

2 participants