Skip to content

Conversation

rtyley
Copy link
Contributor

@rtyley rtyley commented May 29, 2025

sbt added the sonaDeploymentName key with #8126, released recently with v1.11.0 - in use, this seems to be getting lint warnings (linting introduced by #5153):

https://github.com/rtyley/scala-collection-plus/actions/runs/15326291872/job/43121748535#step:6:19

[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

...#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?

sbt added the `sonaDeploymentName` key with sbt#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 sbt#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

...sbt#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`?
Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eed3si9n eed3si9n merged commit a0ed4d9 into sbt:1.11.x May 30, 2025
16 of 17 checks passed
rtyley added a commit to guardian/gha-scala-library-release-workflow that referenced this pull request Jun 4, 2025
https://github.com/sbt/sbt/releases/tag/v1.11.1 includes
sbt/sbt#8143, which gets rid of this incorrect lint
warning during our release process:

```
[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
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants