Skip to content

Commit

Permalink
Router: partial undo on: penalize newlines last
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Dec 16, 2021
1 parent 4dde8fe commit 9c7b202
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1594,7 +1594,7 @@ class FormatOps(
getOpenNLByTree(f, a, penalty)
case _ => Seq.empty
}
val nextPolicies = policies ++ nestedPolicies :+ pnlPolicy
val nextPolicies = (policies :+ pnlPolicy) ++ nestedPolicies
getOpenNLByArgs(argLastFt, argss.tail, penalty, nextPolicies)
}
}
Expand Down
10 changes: 4 additions & 6 deletions scalafmt-tests/src/test/resources/newlines/source_fold.stat
Original file line number Diff line number Diff line change
Expand Up @@ -5157,9 +5157,8 @@ private implicit class ApiExceptionToErrorResponseConverter(ex: ApiException) {
}
>>>
private implicit class ApiExceptionToErrorResponseConverter(ex: ApiException) {
def toErrors: Seq[ErrorResponse] = Seq(
ErrorResponse(ex.errorType.code, ex.errorType.name, Option(ex.getMessage))
)
def toErrors: Seq[ErrorResponse] =
Seq(ErrorResponse(ex.errorType.code, ex.errorType.name, Option(ex.getMessage)))
}
<<< #2965-regression 2
maxColumn = 100
Expand All @@ -5172,7 +5171,6 @@ private implicit class ApiExceptionToErrorResponseConverter(ex: ApiException) {
}
>>>
private implicit class ApiExceptionToErrorResponseConverter(ex: ApiException) {
def toErrors: Seq[ErrorResponse] = Seq(
ErrorResponse(ex.errorType.code, ex.errorType.name, Option(ex.getMessage))
)
def toErrors: Seq[ErrorResponse] =
Seq(ErrorResponse(ex.errorType.code, ex.errorType.name, Option(ex.getMessage)))
}

0 comments on commit 9c7b202

Please sign in to comment.