From d97373454fbb3dedb4f94982525e7e108d28308a Mon Sep 17 00:00:00 2001 From: Roberto Tyley <52038+rtyley@users.noreply.github.com> Date: Thu, 29 May 2025 16:18:28 +0100 Subject: [PATCH] Add `sonaDeploymentName` to `excludeLintKeys` sbt added the `sonaDeploymentName` key with https://github.com/sbt/sbt/pull/8126, released with https://github.com/sbt/sbt/releases/tag/v1.11.0 - in use, this seems to be getting lint warnings (as introduced by https://github.com/sbt/sbt/pull/5153): ``` [warn] there's a key that's not used by any other settings/tasks: [warn] [warn] * scala-collection-plus / sonaDeploymentName [warn] +- /home/runner/work/scala-collection-plus/scala-collection-plus/build.sbt:3 [warn] [warn] note: a setting might still be used by a command; to exclude a key from this `lintUnused` check [warn] either append it to `Global / excludeLintKeys` or call .withRank(KeyRanks.Invisible) on the key ``` https://github.com/rtyley/scala-collection-plus/actions/runs/15326291872/job/43121748535#step:6:19 ...https://github.com/sbt/sbt/pull/5153 does say that "notable exceptions are settings used exclusively by a command" - I _think_ that maybe `sonaDeploymentName` is only used by the commands `sonaRelease` & `sonaUpload`, so it's necessary to add it to `excludeLintKeys`? --- main/src/main/scala/sbt/internal/LintUnused.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/main/src/main/scala/sbt/internal/LintUnused.scala b/main/src/main/scala/sbt/internal/LintUnused.scala index 8df675c15..d41169be7 100644 --- a/main/src/main/scala/sbt/internal/LintUnused.scala +++ b/main/src/main/scala/sbt/internal/LintUnused.scala @@ -44,6 +44,7 @@ object LintUnused { serverConnectionType, serverIdleTimeout, shellPrompt, + sonaDeploymentName, ), includeLintKeys := Set( scalacOptions,