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

Update Clippy #75405

Merged
merged 156 commits into from
Aug 12, 2020
Merged

Update Clippy #75405

merged 156 commits into from
Aug 12, 2020

Conversation

flip1995
Copy link
Member

Biweekly Clippy update (2 days late, since I wanted to wait for #75098)

r? @Manishearth

ThibsG and others added 30 commits July 19, 2020 00:00
…flip1995

Fix FP for `suspicious_arithmetic_impl` from `suspicious_trait_impl` …

As discussed in rust-lang#3215, the `suspicious_trait_impl` lint causes too many false positives, as it is complex to find out if binary operations are suspicious or not.

This PR restricts the number of binary operations to at most one, otherwise we don't lint.
This can be seen as very conservative, but at least FP can be reduced to bare minimum.

Fixes: rust-lang#3215

changelog: limit the `suspicious_arithmetic_impl` lint to one binop, to avoid many FPs
specifically:
cargo dev new_lint --name derive_ord_xor_partial_ord --category correctness --pass late
… which is showing one error when there should be four
…p1995

Small fix: `chmod` 644 `clippy_lints/src/utils/ast_utils.rs`

changelog: none

It looks like `clippy_lints/src/utils/ast_utils.rs` doesn't have to be an executable file.
Basic instruction for new contributors

While answering a few questions to @AB1908, I realized, that our documentation could use some love. Especially the "Getting Started" part for new contributors. So I wrote together some instruction on how to get the toolchain and how to build and test Clippy.

[Rendered](https://github.com/flip1995/rust-clippy/blob/basics/doc/basics.md)

r? @phansch

changelog: none
…r=phansch

Add suggestion for `iter_skip_next` lint

changelog: Add suggestion for [`iter_skip_next`](https://rust-lang.github.io/rust-clippy/master/index.html#iter_skip_next) lint
matthiaskrgr and others added 5 commits August 11, 2020 00:27
make a bunch of lints texts adhere to rustc dev guide

According to the rustc-dev guide: "The text should be matter of fact and avoid capitalization and periods, unless multiple sentences are needed"

changelog: make some lint output adhere to the rustc-dev guide
…xperiment, r=oli-obk

Clippy pointer cast lint experiment

This PR is an experiment about exposing more parts of `rustc_typeck` for use in `clippy`. In particular, the code that checks where a cast is valid or not was exposed, which necessitated exposing [`FnCtxt`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_typeck/check/struct.FnCtxt.html), and figuring out how to create an instance of that type inside `clippy`.

This was prompted by [this clippy issue](rust-lang/rust-clippy#2064).

r? @oli-obk
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 11, 2020
@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 11, 2020

📌 Commit c22ddd9a265301d6d63deb29db1af605cda81a7b has been approved by Manishearth

@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 Aug 11, 2020
@Manishearth
Copy link
Member

@bors rollup=never

@bors
Copy link
Contributor

bors commented Aug 11, 2020

⌛ Testing commit c22ddd9a265301d6d63deb29db1af605cda81a7b with merge d2d0097d3470f478699eca30050646d81aa77dda...

@bors
Copy link
Contributor

bors commented Aug 11, 2020

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 11, 2020
@flip1995
Copy link
Member Author

@Manishearth The commit c22ddd9 was faulty, I removed it again. Now CI should pass.

@Manishearth
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 11, 2020

📌 Commit d6b991d has been approved by Manishearth

@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 Aug 11, 2020
@bors
Copy link
Contributor

bors commented Aug 12, 2020

⌛ Testing commit d6b991d with merge 8da42dd...

@bors
Copy link
Contributor

bors commented Aug 12, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Manishearth
Pushing 8da42dd to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 12, 2020
@bors bors merged commit 8da42dd into rust-lang:master Aug 12, 2020
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 28, 2020
Update Clippy

Biweekly Clippy update (2 days late, since I wanted to wait for rust-lang#75098)

r? @Manishearth
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.