Incorrect auto-fixing in Generic.ControlStructures.InlineControlStructure during live coding#2989
Merged
gsherwood merged 1 commit intosquizlabs:masterfrom Sep 21, 2020
thiemowmde:patch-2
Merged
Incorrect auto-fixing in Generic.ControlStructures.InlineControlStructure during live coding#2989gsherwood merged 1 commit intosquizlabs:masterfrom thiemowmde:patch-2
gsherwood merged 1 commit intosquizlabs:masterfrom
thiemowmde:patch-2
Conversation
… a bracket
While live coding, there might not only be an incomplete `if ():` at the end of a file, it might as well be an incomplete `if () {`. The most minimal example I found is `<?php if ( 1 ) { break;`. The auto-fix currently turns this into `<?php if ( 1 ) { { { { { { { { { { { { { { { { { { { { { { { { { { break;}}}}}}}}}}}}}}}}}}}}}}}}}`. 😲
Contributor
Author
|
What's needed to get a tiny bugfix like this reviewed and merged? |
Member
|
Auto-fixing during live coding seems a bit dangerous. Thanks for fixing this issue, but I suspect there are other lurking in the sniffs. Please let me know if you find more. |
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.
… a bracket
While live coding, there might not only be an incomplete
if ():at the end of a file, it might as well be an incompleteif () {. The most minimal example I found is<?php if ( 1 ) { break;. The auto-fix currently turns this into<?php if ( 1 ) { { { { { { { { { { { { { { { { { { { { { { { { { { break;}}}}}}}}}}}}}}}}}}}}}}}}}. 😲