You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I still need a clippy.toml in the latest stable as I cannot pass arguments to clippy lints like disallowed_methods in the [lints] table in the Cargo.toml. There is prior art with the unexpected_cfgs lint as that sets check-cfg = [..args], but I don't see anything similar for clippy lints that also receive arguments.
Proposed Solution
Add an args or similar entry to the [lints.specific-lint] table that allows passing arguments to clippy (or have clippy read from the Cargo.toml for the configured arguments).
We had this as a future possibility in the RFC. As you said, Cargo/Rustc use this for check-cfg.
This is ultimately up to the Clippy team. In the RFC discussion (e.g. rust-lang/rfcs#3389 (comment)), it sounds like there might be some mismatches in how these work.
Problem
Currently I still need a
clippy.toml
in the latest stable as I cannot pass arguments to clippy lints likedisallowed_methods
in the[lints]
table in theCargo.toml
. There is prior art with theunexpected_cfgs
lint as that setscheck-cfg = [..args]
, but I don't see anything similar for clippy lints that also receive arguments.Proposed Solution
Add an
args
or similar entry to the[lints.specific-lint]
table that allows passing arguments to clippy (or have clippy read from theCargo.toml
for the configured arguments).Notes
I believe that like rust-lang/cargo#14521 , there is no support for this currently.
The text was updated successfully, but these errors were encountered: