Skip to content
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

Handle comments better when moving operators to the end of a line. #193

Closed
wants to merge 1 commit into from
Closed

Conversation

eventualbuddha
Copy link

Closes #192

This is probably a poor implementation of a fix, but it seems to work. I'd appreciate pointers in how to make it better.

@shyiko
Copy link
Collaborator

shyiko commented Apr 22, 2018

Thank you both for the ticket and the PR, Brian.
I do appreciated the effort.

Having said that, I made an alternative fix (which avoids including operator in PsiWhiteSpaceImpl (this could lead to hard to debug problems when combined with other rules mutating the AST) + fixes a similar issue when moving operators to the next line) in 953d6b0. I hope you don't mind.

Fix available in ktlint@0.22.0.

Thanks again 🍻

@shyiko shyiko closed this Apr 22, 2018
@eventualbuddha
Copy link
Author

I don’t mind at all! I figured my approach wouldn’t be optimal since I don’t have all the context for the project. Thanks for the fix!

@eventualbuddha eventualbuddha deleted the ghi-192 branch April 23, 2018 15:07
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.

chain-wrapping auto fix can incorrectly comment out operator
2 participants