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

Remove remaining 2 warn(clippy::*) instances #10438

Merged
merged 1 commit into from Mar 9, 2022

Conversation

rukai
Copy link
Contributor

@rukai rukai commented Mar 1, 2022

What does this PR try to resolve?

Developers often have to manually fix clippy issues in cargo: https://github.com/rust-lang/cargo/pulls?q=clippy
This PR fixes this problem once and for all by denying clippy lints in CI.

Why this is ok actually

CI already denies warnings and this causes CI breakage from time to time due to deprecation in dependencies and new rustc warnings.

We currently only have 2 clippy lints enabled:

#![warn(clippy::needless_borrow)]
#![warn(clippy::redundant_clone)]

As such we are at higher risk of breakage due to rustc warnings then we are due to changes in the detection of these 2 clippy lints.
So we may as well deny clippy as well and get full coverage.

For the tiny cargo-credential etc crates maybe I should just set those to #[allow(clippy::all)] without the additional denies?
This would prevent developers from seeing potential issues when we dont really care about clippy and also avoid all the deny-warnings noise.
I dont really mind either way.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ehuss (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 1, 2022
@rukai rukai force-pushed the deny_clippy branch 4 times, most recently from 1173aed to 720d84f Compare March 1, 2022 11:51
@rukai rukai marked this pull request as ready for review March 1, 2022 12:38
@ehuss
Copy link
Contributor

ehuss commented Mar 8, 2022

I think this is a little more heavy-weight than what those lints justify. At this time, I don't think we want to add clippy to CI. Instead, would you be willing to just remove the two warn(clippy) attributes? I added them as I thought they could be nice for keeping things tidy, but I don't think they are worth the hassle by themselves.

@rukai
Copy link
Contributor Author

rukai commented Mar 8, 2022

Alright, if the cargo team doesnt want to catch these failing lints in CI then I agree that the best thing is to stop them from failing locally.

So I updated the PR to just remove the lints to prevent local only failures.

@rukai rukai changed the title deny clippy lints in CI Remove remaining 2 warn(clippy::*) instances Mar 8, 2022
@ehuss
Copy link
Contributor

ehuss commented Mar 9, 2022

Thanks!

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 9, 2022

📌 Commit fab44ff has been approved by ehuss

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 9, 2022
@bors
Copy link
Collaborator

bors commented Mar 9, 2022

⌛ Testing commit fab44ff with merge 65c8266...

@bors
Copy link
Collaborator

bors commented Mar 9, 2022

☀️ Test successful - checks-actions
Approved by: ehuss
Pushing 65c8266 to master...

@bors bors merged commit 65c8266 into rust-lang:master Mar 9, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 9, 2022
Update cargo

11 commits in 3d6970d50e30e797b8e26b2b9b1bdf92dc381f34..65c82664263feddc5fe2d424be0993c28d46377a
2022-02-28 19:29:07 +0000 to 2022-03-09 02:32:56 +0000
- Remove remaining 2 warn(clippy::*) instances (rust-lang/cargo#10438)
- Use `available_parallelism` instead of `num_cpus` (rust-lang/cargo#10427)
- Wait up to one second while waiting for curl (rust-lang/cargo#10456)
- Improve code coverage (rust-lang/cargo#10460)
- Don't recommend leaking tokens into the console history (rust-lang/cargo#10458)
- fix some typos (rust-lang/cargo#10454)
- Use `extend` instead of `push`ing in a loop (rust-lang/cargo#10453)
- Use locked_version more (rust-lang/cargo#10449)
- Disable dependabot (rust-lang/cargo#10443)
- Update git2 dependencies (rust-lang/cargo#10442)
- Stop gating stable features (rust-lang/cargo#10434)
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 9, 2022
Update cargo

11 commits in 3d6970d50e30e797b8e26b2b9b1bdf92dc381f34..65c82664263feddc5fe2d424be0993c28d46377a
2022-02-28 19:29:07 +0000 to 2022-03-09 02:32:56 +0000
- Remove remaining 2 warn(clippy::*) instances (rust-lang/cargo#10438)
- Use `available_parallelism` instead of `num_cpus` (rust-lang/cargo#10427)
- Wait up to one second while waiting for curl (rust-lang/cargo#10456)
- Improve code coverage (rust-lang/cargo#10460)
- Don't recommend leaking tokens into the console history (rust-lang/cargo#10458)
- fix some typos (rust-lang/cargo#10454)
- Use `extend` instead of `push`ing in a loop (rust-lang/cargo#10453)
- Use locked_version more (rust-lang/cargo#10449)
- Disable dependabot (rust-lang/cargo#10443)
- Update git2 dependencies (rust-lang/cargo#10442)
- Stop gating stable features (rust-lang/cargo#10434)
@ehuss ehuss added this to the 1.61.0 milestone Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants