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
Fix: syntax error after key-spacing
autofix with comment (fixes #7603)
#7607
Conversation
LGTM |
@not-an-aardvark, thanks for your PR! By analyzing the history of the files in this pull request, we identified @RRMoelker, @btmills and @Kyle-Mendes to be potential reviewers. |
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.
LGTM, thanks for turning this around so fast. I agree it's a good candidate for a patch release tomorrow.
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.
Are there test cases for adding space before/after colon with a comment in the way?
LGTM |
@platinumazure There are now! 😃 |
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.
Thank you! LGTM
What is the purpose of this pull request? (put an "X" next to item)
[x] Bug fix (template)
#7603
What changes did you make? (Give an overview)
This updates the
key-spacing
autofixer to be aware of comments. Previously, it would remove whitespace from the token before/after the colon, but if there was a comment between the token and the colon, it would remove text from the edge of the comment instead, causing a syntax error.Is there anything you'd like reviewers to focus on?
Nothing in particular.