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 @@ -156,6 +156,7 @@ public ScalaFinchServerCodegen() {

supportingFiles.add(new SupportingFile("project/build.properties", "project", "build.properties"));
supportingFiles.add(new SupportingFile("project/plugins.sbt", "project", "plugins.sbt"));
supportingFiles.add(new SupportingFile("scalafmt.mustache", "", ".scalafmt.conf"));
supportingFiles.add(new SupportingFile("sbt", "", "sbt"));

supportingFiles.add(new SupportingFile("endpoint.mustache", sourceFolder, "endpoint.scala"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.5.3")

addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0")

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 = scala212
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"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.scalafmt.conf
README.md
build.sbt
project/build.properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.1.0-SNAPSHOT
7.22.0-SNAPSHOT
58 changes: 58 additions & 0 deletions samples/server/petstore/scala-finch/.scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
version=3.10.6
runner.dialect = scala212
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/server/petstore/scala-finch/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.5.3")

addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.6.0")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6")
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ case class MissingIdentifier(message: String) extends CommonError(message)
* @param message An error message
*/
case class RecordNotFound(message: String) extends CommonError(message)

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.openapitools.models._
import org.openapitools.models.ApiResponse
import java.io.File
import org.openapitools.models.Pet
import scala.collection.immutable.Seq
import io.finch.circe._
import io.circe.generic.semiauto._
import com.twitter.concurrent.AsyncStream
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.openapitools._
import org.openapitools.models._
import scala.collection.immutable.Seq
import org.openapitools.models.User
import java.time.ZonedDateTime
import io.finch.circe._
import io.circe.generic.semiauto._
import com.twitter.concurrent.AsyncStream
Expand Down
Loading