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

exclude dangling parens in methods with enabled verticalMultiline #1435

Merged
merged 1 commit into from
Jul 6, 2019

Conversation

darl
Copy link
Contributor

@darl darl commented Jun 20, 2019

This PR adds new configuration flag to avoid dangling parens in method definitions

verticalMultiline.excludeDanglingParens = [ def ]

Example:

def getListing(a: String, b: String, c: String, d: String)(implicit e: String): Future[String] = {
  a + b + c + d + e
}

Without flag formats to:

def getListing(
    a: String, 
    b: String, 
    c: String, 
    d: String
  )(implicit e: String
  ): Future[String] = {
  a + b + c + d + e
}

With new flag:

def getListing(
    a: String, 
    b: String, 
    c: String, 
    d: String
  )(implicit e: String): Future[String] = {
  a + b + c + d + e
}

@darl
Copy link
Contributor Author

darl commented Jun 20, 2019

CI failed with network error:
Caught java.net.ConnectException: Connection timed out (Connection timed out) (Connection timed out (Connection timed out)) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.eed3si9n/sbt-assembly/scala_2.12/sbt_1.0/0.14.7/jars/sbt-assembly.jar

Don't see a button to restart tests

Copy link
Member

@tanishiking tanishiking left a comment

Choose a reason for hiding this comment

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

LGTM!
I re-ran the CI and it now passed 👍 Thank you for your contribution 🚀

@tanishiking tanishiking merged commit 2590f95 into scalameta:master Jul 6, 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.

2 participants