Exclude keys starting with some prefixes from linting

Fixes https://github.com/sbt/sbt/issues/5849
This commit is contained in:
Eugene Yokota 2020-10-19 13:31:30 -04:00
parent 8bea523aea
commit 5d876dc287
1 changed files with 2 additions and 1 deletions

View File

@ -22,8 +22,9 @@ object LintUnused {
keyName => includes(keyName)
},
lintExcludeFilter := {
val excludedPrefixes = List("release", "sonatype", "watch", "whitesource")
val excludes = excludeLintKeys.value.map(_.scopedKey.key.label)
keyName => excludes(keyName) || keyName.startsWith("watch")
keyName => excludes(keyName) || excludedPrefixes.exists(keyName.startsWith(_))
},
excludeLintKeys := Set(
aggregate,