Skip to content

Commit

Permalink
DanglingParentheses: use shortcut values
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Dec 16, 2021
1 parent 9c7b202 commit 1242310
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ case class DanglingParentheses(

object DanglingParentheses {

private val shortcutTrue = DanglingParentheses(true, true)
private val shortcutFalse = DanglingParentheses(false, false, false)
private[config] val shortcutTrue = DanglingParentheses(true, true)
private[config] val shortcutFalse = DanglingParentheses(false, false, false)

val default = shortcutTrue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ case class ScalafmtConfig(
includeCurlyBraceInSelectChains: Boolean = true,
includeNoParensInSelectChains: Boolean = false,
assumeStandardLibraryStripMargin: Boolean = false,
danglingParentheses: DanglingParentheses = DanglingParentheses(true, true),
danglingParentheses: DanglingParentheses = DanglingParentheses.default,
@annotation.DeprecatedName(
"poorMansTrailingCommasInConfigStyle",
"Scala supports trailing commas after 2.12.2. Use trailingCommas instead",
Expand Down Expand Up @@ -264,7 +264,7 @@ object ScalafmtConfig {
optIn = default.optIn.copy(
configStyleArguments = false
),
danglingParentheses = DanglingParentheses(true, true)
danglingParentheses = DanglingParentheses.shortcutTrue
)

def addAlign(style: ScalafmtConfig): ScalafmtConfig =
Expand Down

0 comments on commit 1242310

Please sign in to comment.