-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Explain flags missing in cargo check in --help #7492
Conversation
This commit closes rust-lang#7389. As stated in the issue, `cargo clippy --help` provides explanation for some flags and states that the rest are same as in `cargo check --help`, even though some clippy specific flags exist. This commit extends the `cargo clippy --help` with two additional flags, - `cargo clippy --fix` - `cargo clippy --no-deps` If there are more flags which are not present in `cargo check --help` please bring these to my attention, I will include these aswell. For now, I noticed only the two flags mentioned above.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @camsteffen (or someone else) soon. Please see the contribution instructions for more information. |
To be honest I don't fully understand the implications of Sorry to leave more questions than answers. @rust-lang/clippy hopefully someone knows more than me. |
It comes after the |
Maybe add an additional section to the help message
|
`--no-deps` filled in with a little more information. Explain that `--fix` implies `--no-deps`. Explain that `--no-deps` is used with `cargo clippy --`, including one example.
I like @flip1995's proposed approach. Perhaps we should also just support |
But isn't
Yeah that makes sense to me. |
I wanted to ask the same thing, this doesn't seem very consistent. I feel this would be much better if either all flags must come after |
Oh, for some reason I was under the impression, that the Lines 75 to 80 in fd2b43d
And our tests here: Lines 71 to 72 in fd2b43d
@nfejzic are you comfortable making those changes? Otherwise I can do that. |
As proposed in the pull request thread, there is some inconsistency in handling the `--no-deps` flag which requires `--` before it, and `--fix` flag which does not. In this commit the `--no-deps` flag does not need the `--` anymore. However, it can still be used that way: `cargo clipyy -- --no-deps`.
I pushed a commit which should now handle the For the test, I just changed the order in the existing test, so it now tests the |
I don't think this is necessary. What happens with |
I just tested with the following cases:
All of them finish with the following output:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but would like a second pair of eyes on those changes since this code is quite finicky.
@bors r+ |
📌 Commit f7af8bf has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Are we going to accept |
This commit closes #7389. As stated in the issue,
cargo clippy --help
provides explanation for some flags and states that the rest are same
as in
cargo check --help
, even though some clippy specific flagsexist.
This commit extends the
cargo clippy --help
with two additional flags,cargo clippy --fix
cargo clippy --no-deps
If there are more flags which are not present in
cargo check --help
please bring these to my attention, I will include these aswell.
For now, I noticed only the two flags mentioned above.
changelog:
cargo clippy --help
now explains additional flags missing incargo check --help
.