Clippy should probably say something if it sees both a clippy.toml
and a .clippy.toml
#8323
Labels
A-ui
Area: Clippy interface, usage and configuration
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
Description
I recently wasted a bit of time trying to figure out why my lint configurations in a
clippy.toml
file were not being honored by Clippy. It turned out that the problem was that the workspace already had a.clippy.toml
file, which I hadn't noticed existed.It appears that when clippy searches for config files, it just picks the first one it finds, and stops looking:
rust-clippy/clippy_lints/src/utils/conf.rs
Lines 326 to 335 in 8bb4690
.clippy.toml
file and ignoring theclippy.toml
I had created.Admittedly, this was a pretty silly mistake on my part! But, it would be nice if Clippy could notice when there are multiple config files in a workspace, and say "hey, looks like you have multiple config files in the same workspace, I'm only honoring this one". That would have saved me some confusion.
Version
Additional Labels
@rustbot label +C-enhancement
The text was updated successfully, but these errors were encountered: