Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ public void processOpts() {
if (!excludeSbt) {
supportingFiles.add(new SupportingFile("build.sbt.mustache", "", "build.sbt"));
supportingFiles.add(new SupportingFile("project/build.properties.mustache", "project", "build.properties"));
supportingFiles.add(new SupportingFile("project/plugins.mustache", "project", "plugins.sbt"));
supportingFiles.add(new SupportingFile("scalafmt.mustache", "", ".scalafmt.conf"));
} else {
supportingFiles.remove(new SupportingFile("build.sbt.mustache", "", "build.sbt"));
supportingFiles.remove(new SupportingFile("project/build.properties.mustache", "project", "build.properties"));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6")
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
version=3.10.6
runner.dialect = scala3
project {
git = false
excludeFilters = [
scalafmt-benchmarks/src/resources,
sbt-test
bin/issue
]
layout = StandardConvention
}
align {
preset = none
stripMargin = true
}
binPack {
importSelectors = fold
}
newlines {
avoidForSimpleOverflow = all
ignoreInSyntax = false
source = fold
}
rewrite {
rules = [
AvoidInfix,
Imports,
RedundantBraces,
RedundantParens,
SortModifiers,
]
imports {
selectors = fold
removeRedundantSelectors = true
sort = ascii
groups = [
["org\\.scalafmt\\..*"],
["scala\\.meta\\..*", "org\\.scalameta\\..*"],
["sbt\\..*"],
["java.?\\..*"],
["scala\\..*"],
["org\\..*"],
["com\\..*"],
]
}
redundantBraces {
preset = all
oneStatApply {
parensMaxSpan = 300
bracesMinSpan = 300
}
}
redundantParens {
preset = all
}
sortModifiers.preset = styleGuide
trailingCommas.style = "always"
}
2 changes: 2 additions & 0 deletions samples/client/petstore/scala-http4s/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.scalafmt.conf
build.sbt
project/build.properties
project/plugins.sbt
src/main/scala/org/openapitools/client/apis/BaseClient.scala
src/main/scala/org/openapitools/client/apis/JsonSupports.scala
src/main/scala/org/openapitools/client/apis/PetApi.scala
Expand Down
58 changes: 58 additions & 0 deletions samples/client/petstore/scala-http4s/.scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
version=3.10.6
runner.dialect = scala3
project {
git = false
excludeFilters = [
scalafmt-benchmarks/src/resources,
sbt-test
bin/issue
]
layout = StandardConvention
}
align {
preset = none
stripMargin = true
}
binPack {
importSelectors = fold
}
newlines {
avoidForSimpleOverflow = all
ignoreInSyntax = false
source = fold
}
rewrite {
rules = [
AvoidInfix,
Imports,
RedundantBraces,
RedundantParens,
SortModifiers,
]
imports {
selectors = fold
removeRedundantSelectors = true
sort = ascii
groups = [
["org\\.scalafmt\\..*"],
["scala\\.meta\\..*", "org\\.scalameta\\..*"],
["sbt\\..*"],
["java.?\\..*"],
["scala\\..*"],
["org\\..*"],
["com\\..*"],
]
}
redundantBraces {
preset = all
oneStatApply {
parensMaxSpan = 300
bracesMinSpan = 300
}
}
redundantParens {
preset = all
}
sortModifiers.preset = styleGuide
trailingCommas.style = "always"
}
1 change: 1 addition & 0 deletions samples/client/petstore/scala-http4s/project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6")
Loading