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
style = defaultWithAlign
docstrings = JavaDoc
indentOperator = spray
maxColumn = 120
lineEndings = preserve
rewrite.rules = [RedundantParens, SortImports, AvoidInfix]
unindentTopLevelOperators = true
align.tokens = [{code = "=>", owner = "Case"}]
align.openParenDefnSite = false
align.openParenCallSite = false
optIn.breakChainOnFirstMethodDot = false
optIn.configStyleArguments = false
danglingParentheses = false
spaces.inImportCurlyBraces = true
rewrite.neverInfix.excludeFilters = [
version = 3.6.1
runner.dialect = scala213
project.git = true
style = defaultWithAlign
docstrings.style = Asterisk
docstrings.wrap = false
indentOperator.preset = spray
maxColumn = 120
lineEndings = preserve
rewrite.rules = [RedundantParens, SortImports, AvoidInfix]
indentOperator.exemptScope = all
align.preset = some
align.tokens."+" = [
{
code = "~>"
owners = [
{ regex = "Term.ApplyInfix" }
]
}
]
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
min
max
@ -47,8 +66,12 @@ rewrite.neverInfix.excludeFilters = [
theSameElementsAs
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-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")
// 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