-
Notifications
You must be signed in to change notification settings - Fork 80
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 ktfmt to fix odd formatting with DSLs. #214
Conversation
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.
Thanks! this is awesome! and looks great.
- I'll run the modified code on our repo to see if it does anything weird. I'll report back.
- I commented about a test case that would show how line breaks affect this change. If you can think of additional ones it'll increase confidence in the change.
@cgrushko has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@cgrushko has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
@steventrouble , thanks again for the PR and really sorry it took me forever to look at it. I ran into two weird results of the PR. I'll write a sanitized version of them ASAP and post here.
Can you take a look into why this might happen? |
Please hold on regarding my previous comment - I might have looked at the wrong diff, this might be an existing problem. |
This pull request has been reverted by da6615a34cbe9e62e1ce259bb1de146e03b652f3. |
This pull request has been reverted by d4d46bb81b05d6fdb4d159ca2838725f5b4921a1. |
Update KotlinInputAstVisitorBase.kt's binary expression handling to treat trailing lambdas as separate from the rest of the binary expression. While this should clean up some issues with binary expressions, the main intended side-effect was to fix DSLs:
#206
Before, it would format DSLs like this:
After, it should format them like this