-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
reimplement arg passthrough for clippy-driver #7162
Conversation
r? @Eh2406 (rust_highfive has picked a reviewer for you, use r? to override) |
One thing I want to mention is that the way that clippy passes the args down is inconsistent with how we did it for For cargo fix clippy we take the string associated with the Also this is implemented differently, clippy expects its args to be passed via a special env variable with a big I'd like to see the visible portion of how the args are specified become consistent, at the very least. So at a minimum I'd like trailing As for the implementation details I'd love for it to be consistent but clippy doesn't currently bring in serde_json, and so I'm not sure if its worth going through the effort here to make it consistent or not. @Manishearth input is welcome. |
Can we not use CLIPPY_HACKERY? Part of the goal here is that such hacks aren't needed anymore. We can instead use another trailing -- on clippy. Also, it's totally okay if |
I'm stupid, we can definitely not use clippy_hackery, we dont even need to use it here because we already have the processbuilder, no resplitting is required. |
Right now I've run into an issue with how we implemented
I'd like to tweek primary_unit_rustc so its wrapped in an enum rather than an Option and the enum variants are |
Okay, I removed I think the stuff to fix the I kinda want to hold off on writing that test until #7157 is merged due to expected merge conflicts. |
☔ The latest upstream changes (presumably #7157) made this pull request unmergeable. Please resolve the merge conflicts. |
right on schedule bors, ty bby |
Thanks! Instead of introducing a new enum, I think we can just make the rustc argument explicit for
|
Prior to this change, the old cargo subcommand version of `cargo clippy` had a feature to pass trailing args down to clippy-driver but when this the subcommand was reimplemented inside of cargo this feature was left out accidentally. This change readds the feature to to capture all args after a trailing -- and forward them down to clippy-driver via an env variable.
Okay I think it's good, rereading the code it looks super clean, TY again @ehuss for always providing excellent guidance. |
Thanks! @bors r+ |
📌 Commit 42a00c1 has been approved by |
reimplement arg passthrough for clippy-driver Prior to this change, the old cargo subcommand version of `cargo clippy` had a feature to pass trailing args down to clippy-driver but when this the subcommand was reimplemented inside of cargo this feature was left out accidentally. This change readds the feature to to capture all args after a trailing -- and forward them down to clippy-driver via an env variable.
☀️ Test successful - checks-azure |
Prior to this change, the old cargo subcommand version of
cargo clippy
had a feature to pass trailing args down to clippy-driver but when this
the subcommand was reimplemented inside of cargo this feature was left
out accidentally.
This change readds the feature to to capture all args after a trailing
-- and forward them down to clippy-driver via an env variable.