Update scalafmt settings

This commit is contained in:
eikek
2021-09-22 17:23:24 +02:00
parent c37f1d7c31
commit 9013f2de5b
277 changed files with 1579 additions and 1615 deletions

View File

@ -23,7 +23,7 @@ object Cmd {
def exec(cmd: Seq[String], wd: Option[File]): Result = {
val capt = new Capture
val rc = Process(cmd, wd).!(capt.logger)
val rc = Process(cmd, wd).!(capt.logger)
Result(rc, capt.out.get.mkString("\n"), capt.err.get.mkString("\n"))
}

View File

@ -5,49 +5,49 @@ import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._
object Dependencies {
val BcryptVersion = "0.4"
val BcryptVersion = "0.4"
val BetterMonadicForVersion = "0.3.1"
val BinnyVersion = "0.1.0"
val CalevVersion = "0.6.0"
val CatsParseVersion = "0.3.4"
val CirceVersion = "0.14.1"
val ClipboardJsVersion = "2.0.6"
val DoobieVersion = "1.0.0-RC1"
val EmilVersion = "0.10.0-M3"
val FlexmarkVersion = "0.62.2"
val FlywayVersion = "7.15.0"
val Fs2Version = "3.1.2"
val Fs2CronVersion = "0.7.1"
val H2Version = "1.4.200"
val Http4sVersion = "0.23.4"
val Icu4jVersion = "69.1"
val javaOtpVersion = "0.3.0"
val JsoupVersion = "1.14.2"
val JwtScalaVersion = "9.0.1"
val KindProjectorVersion = "0.10.3"
val KittensVersion = "2.3.2"
val LevigoJbig2Version = "2.0"
val Log4sVersion = "1.10.0"
val LogbackVersion = "1.2.6"
val MariaDbVersion = "2.7.4"
val MUnitVersion = "0.7.29"
val MUnitCatsEffectVersion = "1.0.5"
val OrganizeImportsVersion = "0.5.0"
val PdfboxVersion = "2.0.24"
val PoiVersion = "4.1.2"
val PostgresVersion = "42.2.23"
val PureConfigVersion = "0.16.0"
val ScalaJavaTimeVersion = "2.3.0"
val ScodecBitsVersion = "1.1.28"
val Slf4jVersion = "1.7.32"
val StanfordNlpVersion = "4.2.2"
val TikaVersion = "2.1.0"
val YamuscaVersion = "0.8.1"
val SwaggerUIVersion = "3.52.1"
val TestContainerVersion = "0.39.8"
val TwelveMonkeysVersion = "3.7.0"
val JQueryVersion = "3.5.1"
val ViewerJSVersion = "0.5.9"
val BinnyVersion = "0.1.0"
val CalevVersion = "0.6.0"
val CatsParseVersion = "0.3.4"
val CirceVersion = "0.14.1"
val ClipboardJsVersion = "2.0.6"
val DoobieVersion = "1.0.0-RC1"
val EmilVersion = "0.10.0-M3"
val FlexmarkVersion = "0.62.2"
val FlywayVersion = "7.15.0"
val Fs2Version = "3.1.2"
val Fs2CronVersion = "0.7.1"
val H2Version = "1.4.200"
val Http4sVersion = "0.23.4"
val Icu4jVersion = "69.1"
val javaOtpVersion = "0.3.0"
val JsoupVersion = "1.14.2"
val JwtScalaVersion = "9.0.1"
val KindProjectorVersion = "0.10.3"
val KittensVersion = "2.3.2"
val LevigoJbig2Version = "2.0"
val Log4sVersion = "1.10.0"
val LogbackVersion = "1.2.6"
val MariaDbVersion = "2.7.4"
val MUnitVersion = "0.7.29"
val MUnitCatsEffectVersion = "1.0.5"
val OrganizeImportsVersion = "0.5.0"
val PdfboxVersion = "2.0.24"
val PoiVersion = "4.1.2"
val PostgresVersion = "42.2.23"
val PureConfigVersion = "0.16.0"
val ScalaJavaTimeVersion = "2.3.0"
val ScodecBitsVersion = "1.1.28"
val Slf4jVersion = "1.7.32"
val StanfordNlpVersion = "4.2.2"
val TikaVersion = "2.1.0"
val YamuscaVersion = "0.8.1"
val SwaggerUIVersion = "3.52.1"
val TestContainerVersion = "0.39.8"
val TwelveMonkeysVersion = "3.7.0"
val JQueryVersion = "3.5.1"
val ViewerJSVersion = "0.5.9"
val jwtScala = Seq(
"com.github.jwt-scala" %% "jwt-circe" % JwtScalaVersion
@ -62,8 +62,8 @@ object Dependencies {
)
val testContainer = Seq(
"com.dimafeng" %% "testcontainers-scala-munit" % TestContainerVersion,
"com.dimafeng" %% "testcontainers-scala-mariadb" % TestContainerVersion,
"com.dimafeng" %% "testcontainers-scala-munit" % TestContainerVersion,
"com.dimafeng" %% "testcontainers-scala-mariadb" % TestContainerVersion,
"com.dimafeng" %% "testcontainers-scala-postgresql" % TestContainerVersion
)
@ -103,8 +103,8 @@ object Dependencies {
)
val poi = Seq(
"org.apache.poi" % "poi" % PoiVersion,
"org.apache.poi" % "poi-ooxml" % PoiVersion,
"org.apache.poi" % "poi" % PoiVersion,
"org.apache.poi" % "poi-ooxml" % PoiVersion,
"org.apache.poi" % "poi-scratchpad" % PoiVersion
).map(
_.excludeAll(
@ -115,8 +115,8 @@ object Dependencies {
// https://github.com/vsch/flexmark-java
// BSD 2-Clause
val flexmark = Seq(
"com.vladsch.flexmark" % "flexmark" % FlexmarkVersion,
"com.vladsch.flexmark" % "flexmark-ext-tables" % FlexmarkVersion,
"com.vladsch.flexmark" % "flexmark" % FlexmarkVersion,
"com.vladsch.flexmark" % "flexmark-ext-tables" % FlexmarkVersion,
"com.vladsch.flexmark" % "flexmark-ext-gfm-strikethrough" % FlexmarkVersion
).map(
_.excludeAll(
@ -145,7 +145,7 @@ object Dependencies {
"com.github.eikek" %% "emil-common" % EmilVersion
)
val emil = Seq(
"com.github.eikek" %% "emil-common" % EmilVersion,
"com.github.eikek" %% "emil-common" % EmilVersion,
"com.github.eikek" %% "emil-javamail" % EmilVersion
)
val emilDoobie = Seq(
@ -214,7 +214,7 @@ object Dependencies {
val fs2 = Seq(
"co.fs2" %% "fs2-core" % Fs2Version,
"co.fs2" %% "fs2-io" % Fs2Version
"co.fs2" %% "fs2-io" % Fs2Version
)
val http4sClient = Seq(
@ -235,7 +235,7 @@ object Dependencies {
val circe = Seq(
"io.circe" %% "circe-generic" % CirceVersion,
"io.circe" %% "circe-parser" % CirceVersion
"io.circe" %% "circe-parser" % CirceVersion
)
// https://github.com/Log4s/log4s;ASL 2.0
@ -269,13 +269,13 @@ object Dependencies {
// https://github.com/tpolecat/doobie
// MIT
val doobie = Seq(
"org.tpolecat" %% "doobie-core" % DoobieVersion,
"org.tpolecat" %% "doobie-core" % DoobieVersion,
"org.tpolecat" %% "doobie-hikari" % DoobieVersion
)
val binny = Seq(
"com.github.eikek" %% "binny-core" % BinnyVersion,
"com.github.eikek" %% "binny-jdbc" % BinnyVersion,
"com.github.eikek" %% "binny-core" % BinnyVersion,
"com.github.eikek" %% "binny-jdbc" % BinnyVersion,
"com.github.eikek" %% "binny-tika-detect" % BinnyVersion
)
@ -290,8 +290,8 @@ object Dependencies {
)
val munit = Seq(
"org.scalameta" %% "munit" % MUnitVersion,
"org.scalameta" %% "munit-scalacheck" % MUnitVersion,
"org.scalameta" %% "munit" % MUnitVersion,
"org.scalameta" %% "munit-scalacheck" % MUnitVersion,
"org.typelevel" %% "munit-cats-effect-3" % MUnitCatsEffectVersion
)
@ -299,8 +299,8 @@ object Dependencies {
val betterMonadicFor = "com.olegpy" %% "better-monadic-for" % BetterMonadicForVersion
val webjars = Seq(
"org.webjars" % "swagger-ui" % SwaggerUIVersion,
"org.webjars" % "viewerjs" % ViewerJSVersion,
"org.webjars" % "swagger-ui" % SwaggerUIVersion,
"org.webjars" % "viewerjs" % ViewerJSVersion,
"org.webjars" % "clipboard.js" % ClipboardJsVersion
)

View File

@ -19,7 +19,7 @@ object NerModelsPlugin extends AutoPlugin {
object autoImport {
val NerModels = config("NerModels")
val nerModelsFilter = settingKey[String => Boolean]("Which files to keep.")
val nerModelsFilter = settingKey[String => Boolean]("Which files to keep.")
val nerModelsRunFilter = taskKey[Seq[File]]("Extract files from libraryDependencies")
}

View File

@ -17,12 +17,12 @@ object StylesPlugin extends AutoPlugin {
sealed trait StylesMode
object StylesMode {
case object Prod extends StylesMode
case object Dev extends StylesMode
case object Dev extends StylesMode
}
val stylesDirectory = settingKey[File]("The directory containing source styles")
val stylesOutputDir = settingKey[File]("The directory to put the final outcome")
val stylesMode = settingKey[StylesMode]("The compile mode, dev or production")
val stylesDirectory = settingKey[File]("The directory containing source styles")
val stylesOutputDir = settingKey[File]("The directory to put the final outcome")
val stylesMode = settingKey[StylesMode]("The compile mode, dev or production")
val stylesNpxCommand = settingKey[String]("The npx executable")
val stylesNpmCommand =
settingKey[String]("The npm executable for installing dependencies")
@ -42,15 +42,15 @@ object StylesPlugin extends AutoPlugin {
"META-INF" / "resources" / "webjars" / name.value / version.value,
stylesNpxCommand := "npx",
stylesNpmCommand := "npm",
stylesMode := StylesMode.Dev,
stylesMode := StylesMode.Dev,
stylesBuild := {
val logger = streams.value.log
val npx = stylesNpxCommand.value
val npm = stylesNpmCommand.value
val inDir = stylesDirectory.value
val npx = stylesNpxCommand.value
val npm = stylesNpmCommand.value
val inDir = stylesDirectory.value
val outDir = stylesOutputDir.value
val wd = (Compile / baseDirectory).value
val mode = stylesMode.value
val wd = (Compile / baseDirectory).value
val mode = stylesMode.value
npmInstall(npm, wd, logger)
val files = postCss(npx, inDir, outDir, wd, mode, logger) ++
copyWebfonts(wd, outDir, logger) ++
@ -60,8 +60,8 @@ object StylesPlugin extends AutoPlugin {
},
stylesInstall := {
val logger = streams.value.log
val npm = stylesNpmCommand.value
val wd = (LocalRootProject / baseDirectory).value
val npm = stylesNpmCommand.value
val wd = (LocalRootProject / baseDirectory).value
npmInstall(npm, wd, logger)
}

View File

@ -7,9 +7,9 @@ import scala.sys.process._
object ZolaPlugin extends AutoPlugin {
object autoImport {
val zolaRootDir = settingKey[File]("The root directory of zola")
val zolaRootDir = settingKey[File]("The root directory of zola")
val zolaOutputDir = settingKey[File]("The directory to put the final site")
val zolaCommand = settingKey[String]("The zola executable")
val zolaCommand = settingKey[String]("The zola executable")
val zolaTestBaseUrl =
settingKey[String]("The base-url to use when building the test site.")
@ -28,9 +28,9 @@ object ZolaPlugin extends AutoPlugin {
def zolaSettings: Seq[Setting[_]] =
Seq(
zolaRootDir := baseDirectory.value / "site",
zolaOutputDir := target.value / "zola-site",
zolaCommand := "zola",
zolaRootDir := baseDirectory.value / "site",
zolaOutputDir := target.value / "zola-site",
zolaCommand := "zola",
zolaTestBaseUrl := "http://localhost:1234",
zolaBuild := {
val logger = streams.value.log
@ -40,7 +40,7 @@ object ZolaPlugin extends AutoPlugin {
logger.info("Website built")
},
zolaBuildTest := {
val logger = streams.value.log
val logger = streams.value.log
val baseurl = zolaTestBaseUrl.value
logger.info("Building web site (test) using zola ...")
(Compile / resources).value

View File

@ -1,14 +1,14 @@
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.31")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("com.github.eikek" % "sbt-openapi-schema" % "0.8.2")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.1")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("io.kevinlee" % "sbt-github-pages" % "0.7.0")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.31")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
addSbtPlugin("com.github.eikek" % "sbt-openapi-schema" % "0.8.2")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.8.1")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")
addSbtPlugin("io.kevinlee" % "sbt-github-pages" % "0.7.0")
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")