-
Notifications
You must be signed in to change notification settings - Fork 950
Closed
Labels
Description
problem
- sbt will silently ignore unused settings.
- Displaying warning for all unused tasks and setting will catch top level keys like
clean
.
scalacOptions in compile += "-X"
expectation
- I can mark keys to be top level or secondary. (
keyUsage in (ThisBuild, foo) := Usage.Secondary
, probably tasks default to top level, and settings default to secondary.) - There's a
buildLint
command that warns on unused setting/task expressions with secondary keys provided bybuild.sbt
. - The warning takes in account of the scope delegation rules.
- Debug mode to display unused setting/task expressions provided by plugins, including the Defaults.
scalacOptions in compile += "-X"
^
[warning] Unused key: projA/*:compile::scalacOptions was not referenced by other settings/tasks.
notes
Many have brought up the idea of warning on unused. Here's previous thread on unused settings from 2011, which shows 58 unused settings.
rbellamy, SethTisue, julienrf, ShaneDelmore and japgollyjvican, DavidGregory084 and m-sp