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

Support trailing commas in sbt files #1098

Closed
olafurpg opened this issue Jan 15, 2018 · 2 comments
Closed

Support trailing commas in sbt files #1098

olafurpg opened this issue Jan 15, 2018 · 2 comments
Labels

Comments

@olafurpg
Copy link
Member

Currently, the sbt dialect is based of 211, which does not permit trailing commas. We should base it off the default lenient dialect.

@olafurpg olafurpg added the bug label Jan 15, 2018
@dwijnand
Copy link
Contributor

I'm happy to try and fix this. How do I setup a failing test for this? I'm happy to look at prior art/PRs.

@olafurpg
Copy link
Member Author

Very cool @dwijnand See

As for failing test, I think it should be sufficient to have a org.scalafmt.DialectSuite FunSuite that unit tests that

ScalafmtRunner.sbt("""
lazy 
val x = project(
  a,


  b,
)
"".parse[Source].get

doesn't crash

dwijnand added a commit to dwijnand/scalafmt that referenced this issue Jan 24, 2018
dwijnand added a commit to dwijnand/scalafmt that referenced this issue Jan 24, 2018
dwijnand added a commit to dwijnand/scalafmt that referenced this issue Jan 24, 2018
dwijnand added a commit to dwijnand/scalafmt that referenced this issue Jan 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants