mirror of https://github.com/sbt/sbt.git
Merge pull request #5985 from xirc/use-lint-xxx-filter-in-test
Use lint***Filter instead of ***LintKeys for more reliable tests
This commit is contained in:
commit
2f7cc6e9e9
|
|
@ -2,14 +2,18 @@ ThisBuild / doc / scalacOptions += "-Xsomething"
|
||||||
|
|
||||||
ThisBuild / shellPrompt := { state => "sbt> " }
|
ThisBuild / shellPrompt := { state => "sbt> " }
|
||||||
|
|
||||||
|
// watch related settings
|
||||||
|
ThisBuild / sbt.nio.Keys.watchTriggers := Seq()
|
||||||
|
ThisBuild / sbt.nio.Keys.watchPersistFileStamps := true
|
||||||
|
|
||||||
lazy val lintBuildTest = taskKey[Unit]("")
|
lazy val lintBuildTest = taskKey[Unit]("")
|
||||||
|
|
||||||
lazy val root = (project in file("."))
|
lazy val root = (project in file("."))
|
||||||
.settings(
|
.settings(
|
||||||
lintBuildTest := {
|
lintBuildTest := {
|
||||||
val state = Keys.state.value
|
val state = Keys.state.value
|
||||||
val includeKeys = (includeLintKeys in Global).value map { _.scopedKey.key.label }
|
val includeKeys = (lintIncludeFilter in Global).value
|
||||||
val excludeKeys = (excludeLintKeys in Global).value map { _.scopedKey.key.label }
|
val excludeKeys = (lintExcludeFilter in Global).value
|
||||||
val result = sbt.internal.LintUnused.lintUnused(state, includeKeys, excludeKeys)
|
val result = sbt.internal.LintUnused.lintUnused(state, includeKeys, excludeKeys)
|
||||||
result foreach {
|
result foreach {
|
||||||
case (_, "ThisBuild / doc / scalacOptions", _) => ()
|
case (_, "ThisBuild / doc / scalacOptions", _) => ()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue