Skip to content
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

Configure clippy lints further with the [lints] table. #13712

Open
jalil-salame opened this issue Nov 20, 2024 · 2 comments
Open

Configure clippy lints further with the [lints] table. #13712

jalil-salame opened this issue Nov 20, 2024 · 2 comments

Comments

@jalil-salame
Copy link

Problem

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).

Notes

I believe that like rust-lang/cargo#14521 , there is no support for this currently.

@epage
Copy link

epage commented Nov 20, 2024

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.

Moving this over to clippy

@epage
Copy link

epage commented Nov 20, 2024

@rustbot transfer rust-clippy

@rustbot rustbot transferred this issue from rust-lang/cargo Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants