-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A newly created clippy.toml does not trigger a rebuild #9928
Comments
The situation should be a bit better with #9707, after that changes to existing config files will trigger a rebuild. That'll arrive in the next nightly after rust-lang/rust#104688 is merged It doesn't fix your example though if |
This caused a lot of confusion for me today. I was setting CLIPPY_CONF_DIR to use a new global clippy config file and was very confused why it wasn't working. More confusingly, clippy will fail instantly if CLIPPY_CONF_DIR is invalid or doesn't contain a clippy.toml/.clippy.toml, but it will not actually read, validate, or use those values until something triggers a rebuild, making me believe the problem was with the lint or the configuration option I was setting. |
Trigger a rebuild when `CLIPPY_CONF_DIR` changes changelog: none This is a fix for #9928 (comment), any time `CLIPPY_CONF_DIR` changes cargo will now rebuild the crate clippy is being run on, giving it a chance to lint with the (potentially) different config file r? `@flip1995`
Summary
If results from a previous run are present, Clippy ignores changes to a "clippy.toml" file. This makes debugging frustrating, because Clippy's outputs are not a function of its current ostensible inputs.
The following transcript shows that, even if
clippy.toml
has invalid contents, Clippy doesn't notice untilcargo clean
removes its cached results.Reproducer
I tried this code:
<code>
I expected to see this happen:
Instead, this happened:
Version
No response
Additional Labels
No response
The text was updated successfully, but these errors were encountered: