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

Do not add a new line in multilevel chained package clause #1594

Merged
merged 3 commits into from
Dec 7, 2019
Merged

Do not add a new line in multilevel chained package clause #1594

merged 3 commits into from
Dec 7, 2019

Conversation

iRevive
Copy link
Contributor

@iRevive iRevive commented Dec 7, 2019

This PR fixes #1593

Copy link
Member

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 thank you for reporting and fixing this issue! Could you take a look @kitbellew?

Copy link
Collaborator

@kitbellew kitbellew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a couple of questions below.

p.s. you included a few unrelated cosmetic changes as well, looks like.

package f

import g.h.i.j
package k {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should there be an empty line here as well? perhaps it was this way before.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, scalafmt does not change formatting between import and class and keeps an empty line (if it present) as is.

pkg.stats.headOption

// package a.b.c
case select: Term.Select =>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would this pattern match package a.b.c { as well? there might an Apply there somewhere.

@kitbellew
Copy link
Collaborator

@iRevive thank you for the fix, and for adding the test.

@olafurpg the commit is good to go.

@poslegm
Copy link
Collaborator

poslegm commented Dec 7, 2019

Thank you!

@poslegm poslegm merged commit c907b5e into scalameta:master Dec 7, 2019
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.

Excess new line in the chained package clauses
4 participants