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
Update: indentation of comment followed by semicolon (fixes #12232) #12243
Conversation
d5c72b2
to
05db44c
Compare
@kaicataldo Thanks for contributing! As this is a bug fix which adds new warnings in some circumstances, could you please update the commit summary tag to "Update"? Thanks! |
Sure thing! I was thinking of this as a semver-patch change because it should have the same number of warnings - it’s just enforcing a different indentation. |
05db44c
to
2e633d3
Compare
Huh, looks like the commit message check is now checking the last commit rather than the first. I'll squash my commits. |
2e633d3
to
0192f74
Compare
The commit-message check looks at the commit message if there is only one commit, otherwise it looks at the PR title. At least, that's what is supposed to happen. Did your experience not match that? |
I’m not sure, to be honest! It was passing the commit message check and then started failing after I force pushed my changes with a third commit. Either way, looks like it’s fine 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.
LGTM, thanks! I'd like another set of eyes on this before merging.
f92352e
to
9b4eba7
Compare
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, thank you!
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
[X] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
fixes #12232
What changes did you make? (Give an overview)
This PR adds additional logic for comments that precede a line that begins with a semicolon. The current behavior (indenting 1 level) exists because the comment is treated as a child of the node on the previous line.
Is there anything you'd like reviewers to focus on?
Nothing in particular!