mirror of https://github.com/sbt/sbt.git
Remove lint warnings in sbt build
There were a number of unused key lint warnings when loading the sbt build. In the case of `fork in compile` and `crossVersion in update`, it wasn't clear that these were actually used, so I removed those settings. The others seemed to be used so I just added them to the exclude list. To make this work with legacy versions of sbt, I redefined the excludeLintKeys key. Once we update the build.properties to a 1.4.x version, we can drop the `val excludeLint` definition and replace `excludeLint` with `excludeLintKeys`. Side note: ++= does not work with excludeLintKeys which is why I used += for the excludes.
This commit is contained in:
parent
67e7b51979
commit
4698f388e9
10
build.sbt
10
build.sbt
|
|
@ -16,6 +16,13 @@ ThisBuild / scalafmtOnCompile := !(Global / insideCI).value
|
||||||
ThisBuild / Test / scalafmtOnCompile := !(Global / insideCI).value
|
ThisBuild / Test / scalafmtOnCompile := !(Global / insideCI).value
|
||||||
ThisBuild / turbo := true
|
ThisBuild / turbo := true
|
||||||
|
|
||||||
|
val excludeLint = SettingKey[Set[Def.KeyedInitialize[_]]]("excludeLintKeys")
|
||||||
|
Global / excludeLint := (Global / excludeLint).?.value.getOrElse(Set.empty)
|
||||||
|
Global / excludeLint += componentID
|
||||||
|
Global / excludeLint += whitesourceIgnoredScopes
|
||||||
|
Global / excludeLint += scriptedBufferLog
|
||||||
|
Global / excludeLint += checkPluginCross
|
||||||
|
|
||||||
// ThisBuild settings take lower precedence,
|
// ThisBuild settings take lower precedence,
|
||||||
// but can be shared across the multi projects.
|
// but can be shared across the multi projects.
|
||||||
def buildLevelSettings: Seq[Setting[_]] =
|
def buildLevelSettings: Seq[Setting[_]] =
|
||||||
|
|
@ -103,8 +110,7 @@ def commonBaseSettings: Seq[Setting[_]] = Def.settings(
|
||||||
bintrayPackage := (bintrayPackage in ThisBuild).value,
|
bintrayPackage := (bintrayPackage in ThisBuild).value,
|
||||||
bintrayRepository := (bintrayRepository in ThisBuild).value,
|
bintrayRepository := (bintrayRepository in ThisBuild).value,
|
||||||
publishArtifact in Test := false,
|
publishArtifact in Test := false,
|
||||||
fork in compile := true,
|
fork in run := true,
|
||||||
fork in run := true
|
|
||||||
)
|
)
|
||||||
def commonSettings: Seq[Setting[_]] =
|
def commonSettings: Seq[Setting[_]] =
|
||||||
commonBaseSettings :+
|
commonBaseSettings :+
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ object NightlyPlugin extends AutoPlugin {
|
||||||
)
|
)
|
||||||
|
|
||||||
override def projectSettings: Seq[Setting[_]] = Seq(
|
override def projectSettings: Seq[Setting[_]] = Seq(
|
||||||
crossVersion in update := CrossVersion.full,
|
|
||||||
resolvers += Resolver.typesafeIvyRepo("releases").withName("typesafe-alt-project-releases")
|
resolvers += Resolver.typesafeIvyRepo("releases").withName("typesafe-alt-project-releases")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue