Update scalafmt

This commit is contained in:
Matthew de Detrich 2022-11-02 09:19:40 +01:00 committed by Matthew de Detrich
parent a8ee7c4239
commit b79cee657b
2 changed files with 43 additions and 20 deletions

View file

@ -1,21 +1,40 @@
version = 2.1.0 version = 3.6.1
runner.dialect = scala213
style = defaultWithAlign project.git = true
style = defaultWithAlign
docstrings = JavaDoc docstrings.style = Asterisk
indentOperator = spray docstrings.wrap = false
maxColumn = 120 indentOperator.preset = spray
lineEndings = preserve maxColumn = 120
rewrite.rules = [RedundantParens, SortImports, AvoidInfix] lineEndings = preserve
unindentTopLevelOperators = true rewrite.rules = [RedundantParens, SortImports, AvoidInfix]
align.tokens = [{code = "=>", owner = "Case"}] indentOperator.exemptScope = all
align.openParenDefnSite = false align.preset = some
align.openParenCallSite = false align.tokens."+" = [
optIn.breakChainOnFirstMethodDot = false {
optIn.configStyleArguments = false code = "~>"
danglingParentheses = false owners = [
spaces.inImportCurlyBraces = true { regex = "Term.ApplyInfix" }
rewrite.neverInfix.excludeFilters = [ ]
}
]
literals.hexDigits = upper
literals.hexPrefix = lower
binPack.unsafeCallSite = always
binPack.unsafeDefnSite = always
binPack.indentCallSiteSingleArg = false
binPack.indentCallSiteOnce = true
newlines.avoidForSimpleOverflow = [slc]
newlines.source = keep
newlines.beforeMultiline = keep
align.openParenDefnSite = false
align.openParenCallSite = false
align.allowOverflow = true
optIn.breakChainOnFirstMethodDot = false
optIn.configStyleArguments = false
danglingParentheses.preset = false
spaces.inImportCurlyBraces = true
rewrite.neverInfix.excludeFilters = [
and and
min min
max max
@ -47,8 +66,12 @@ rewrite.neverInfix.excludeFilters = [
theSameElementsAs theSameElementsAs
theSameElementsInOrderAs theSameElementsInOrderAs
] ]
rewriteTokens = { rewriteTokens = {
"⇒": "=>" "⇒": "=>"
"→": "->" "→": "->"
"←": "<-" "←": "<-"
} }
project.excludeFilters = [
"scripts/authors.scala"
]
project.layout = StandardConvention

View file

@ -5,7 +5,7 @@ libraryDependencies += Defaults.sbtPluginExtra(
addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0") addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.7.0")
addSbtPlugin("com.lightbend.sbt" % "sbt-bill-of-materials" % "1.0.2") addSbtPlugin("com.lightbend.sbt" % "sbt-bill-of-materials" % "1.0.2")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.33") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.33")
// sbt-osgi 0.9.5 is available but breaks including jdk9-only classes // sbt-osgi 0.9.5 is available but breaks including jdk9-only classes
// sbt-osgi 0.9.6 is available but breaks populating akka-protobuf-v3 // sbt-osgi 0.9.6 is available but breaks populating akka-protobuf-v3