mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-03-28 17:55:06 +00:00
Add scalafix and organize-imports rule
This commit is contained in:
parent
5bad157b9e
commit
672ed445b1
13
.scalafix.conf
Normal file
13
.scalafix.conf
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
rules = [
|
||||||
|
ProcedureSyntax
|
||||||
|
OrganizeImports
|
||||||
|
]
|
||||||
|
OrganizeImports {
|
||||||
|
coalesceToWildcardImportThreshold = 3
|
||||||
|
expandRelative = true
|
||||||
|
groupedImports = Keep
|
||||||
|
importsOrder = Ascii
|
||||||
|
groups = ["re:javax?\\.", "scala.", "re:(cats|fs2)\\.", "docspell.", "*"]
|
||||||
|
importSelectorsOrder = Ascii
|
||||||
|
removeUnused = true
|
||||||
|
}
|
@ -11,6 +11,12 @@ val elmCompileMode = settingKey[ElmCompileMode]("How to compile elm sources")
|
|||||||
|
|
||||||
// --- Settings
|
// --- Settings
|
||||||
|
|
||||||
|
val scalafixSettings = Seq(
|
||||||
|
semanticdbEnabled := true, // enable SemanticDB
|
||||||
|
semanticdbVersion := scalafixSemanticdb.revision, //"4.3.10", // use Scalafix compatible version
|
||||||
|
ThisBuild / scalafixDependencies ++= Dependencies.organizeImports
|
||||||
|
)
|
||||||
|
|
||||||
val sharedSettings = Seq(
|
val sharedSettings = Seq(
|
||||||
organization := "com.github.eikek",
|
organization := "com.github.eikek",
|
||||||
scalaVersion := "2.13.2",
|
scalaVersion := "2.13.2",
|
||||||
@ -37,7 +43,7 @@ val sharedSettings = Seq(
|
|||||||
(scalacOptions.value.filter(o => !o.contains("Xlint")) ++ Seq("-Xlint:_,-unused")),
|
(scalacOptions.value.filter(o => !o.contains("Xlint")) ++ Seq("-Xlint:_,-unused")),
|
||||||
scalacOptions in (Test, console) :=
|
scalacOptions in (Test, console) :=
|
||||||
(scalacOptions.value.filter(o => !o.contains("Xlint")) ++ Seq("-Xlint:_,-unused"))
|
(scalacOptions.value.filter(o => !o.contains("Xlint")) ++ Seq("-Xlint:_,-unused"))
|
||||||
)
|
) ++ scalafixSettings
|
||||||
|
|
||||||
val testSettings = Seq(
|
val testSettings = Seq(
|
||||||
testFrameworks += new TestFramework("minitest.runner.Framework"),
|
testFrameworks += new TestFramework("minitest.runner.Framework"),
|
||||||
@ -143,7 +149,6 @@ val openapiScalaSettings = Seq(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// --- Modules
|
// --- Modules
|
||||||
|
|
||||||
// Base module, everything depends on this – including restapi and
|
// Base module, everything depends on this – including restapi and
|
||||||
|
@ -24,6 +24,7 @@ object Dependencies {
|
|||||||
val LogbackVersion = "1.2.3"
|
val LogbackVersion = "1.2.3"
|
||||||
val MariaDbVersion = "2.6.1"
|
val MariaDbVersion = "2.6.1"
|
||||||
val MiniTestVersion = "2.8.2"
|
val MiniTestVersion = "2.8.2"
|
||||||
|
val OrganizeImportsVersion = "0.3.1-RC3"
|
||||||
val PdfboxVersion = "2.0.20"
|
val PdfboxVersion = "2.0.20"
|
||||||
val PoiVersion = "4.1.2"
|
val PoiVersion = "4.1.2"
|
||||||
val PostgresVersion = "42.2.14"
|
val PostgresVersion = "42.2.14"
|
||||||
@ -253,4 +254,8 @@ object Dependencies {
|
|||||||
val icu4j = Seq(
|
val icu4j = Seq(
|
||||||
"com.ibm.icu" % "icu4j" % Icu4jVersion
|
"com.ibm.icu" % "icu4j" % Icu4jVersion
|
||||||
)
|
)
|
||||||
|
|
||||||
|
val organizeImports = Seq(
|
||||||
|
"com.github.liancheng" %% "organize-imports" % OrganizeImportsVersion
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.17")
|
||||||
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.2.1")
|
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.2.1")
|
||||||
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
|
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0")
|
||||||
addSbtPlugin("com.github.eikek" % "sbt-openapi-schema" % "0.6.1")
|
addSbtPlugin("com.github.eikek" % "sbt-openapi-schema" % "0.6.1")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user