-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #233 from bjaglin/excludeLintKeys
ensure keys do not need to be silenced with excludeLintKeys
- Loading branch information
Showing
5 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
ThisBuild / scalafixDependencies := Nil | ||
ThisBuild / scalafixResolvers := Nil | ||
ThisBuild / scalafixScalaBinaryVersion := "2.12" | ||
scalafixCaching := false | ||
scalafixConfig := None | ||
scalafixOnCompile := false | ||
|
||
lazy val checkLintWarns = taskKey[Unit]("") | ||
checkLintWarns := { | ||
// https://github.com/sbt/sbt/blob/v1.4.9/sbt/src/sbt-test/project/lint/build.sbt | ||
val state = Keys.state.value | ||
val includeKeys = | ||
(Global / includeLintKeys).value.map(_.scopedKey.key.label) | ||
val excludeKeys = | ||
(Global / excludeLintKeys).value.map(_.scopedKey.key.label) | ||
val result = | ||
sbt.internal.LintUnused.lintUnused(state, includeKeys, excludeKeys) | ||
assert(result.size == 0) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.4.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
resolvers += Resolver.sonatypeRepo("public") | ||
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % sys.props("plugin.version")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
> checkLintWarns |