Add non-lint `advice` messages controlled through a `[advice]` lint table
Problem
We have many situations where people would find additional information useful for new users at the cost of output blot.
Potential cases
-
cargo newssee moreCargo.tomlkeys and their definitions -
cargo addcalling out thelib.name(#15887) - misnamed config (#8631)
- suggest
[workspace]when using path dependencies (#7589) - unused config relative to a
--manifest-path(#2930) - No locking available (#16184)
Proposed Solution
Add a non-lint advice. This is meant to be slightly more verbose output of helpful suggestions that the user can turn off for less output, similar to git.
A fundamental difference between a lint and advice is that a lint is focused on the project while advice is focused on the user.
Notes
#9936 would be helpful so we can easily tell people how to disable advice
Created this atm to help collect use cases s we can better evaluate this
Would this table live in workspace/package manifests or in configuration? The use case feels more like a per-user config thing, but the lints table is workspace/package level and I didn’t see any explicit mention of config vs manifest.
Config. I guess in my rewording I didn't say it explicitly but
- it is labeled as configuration, rather than manifest
- I call out this is user focused, rather than project.