-
Notifications
You must be signed in to change notification settings - Fork 276
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
FormatWriter: insert newline after packages #1069 #1555
FormatWriter: insert newline after packages #1069 #1555
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.
This is a long overdue fix! I like the new behavior, big 👍 from me.
Did you try running this against scala-repos to see if any unexpected diffs came up?
Only one blocking comment, otherwise this looks ready to go.
nextNonCommentWithCount(toks(i).formatToken) | ||
isMultiline(actualOwner(nextNonComment).tokens.last, i + distance + 1) | ||
val formatToken = toks(i).formatToken | ||
def checkPackage: Option[Boolean] = { |
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.
We should guard this change against edition = 2019-11
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.
will add the edition here, and post the diffs from scala-repos later today.
for now, working on #1557, i think the solution is incomplete, but chains are surprisingly difficult.
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.
Chains are very difficult with the current router design. I spent a LOT of time trying to break on plain a.b
without exploding the search state but failed.
3e30c6f
to
00d40a6
Compare
@olafurpg rebased, added edition, as requested. updated description regarding |
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!
Fixes #1069
This commit produces no diffs on
scala-repos
.