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: fix indent bug with binary operators/ignoredNodes (fixes #9882) #9951
Conversation
For the test case you've added-- what does indent currently do, and how does your change fix it? Is there an invalid case that could be added based on this change? |
The current behavior can be viewed here (for posterity, it reports errors on the last two lines). I don't think there are any invalid cases that would make sense here, since this bug seems to only affect cases where the node is supposed to be ignored. |
Thanks for contributing! |
What is the purpose of this pull request? (put an "X" next to item)
[x] Bug fix (#9882)
What changes did you make? (Give an overview)
This updates the
indent
rule to avoid setting the offset of the right-hand side of aBinaryExpression
to depend on the token after the operator, which was unnecessary and could cause problems when the right-hand side of the expression was ignored.Is there anything you'd like reviewers to focus on?
Nothing in particular