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

Gate PR CI on clippy correctness lints #119451

Merged
merged 1 commit into from
Feb 13, 2024
Merged

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Dec 30, 2023

Implements part of rust-lang/compiler-team#709.

Note that x.py clippy compiler also checks the standard library, because it needs to be checked before the compiler. This happens even with x.py clippy --stage 0.

@rustbot
Copy link
Collaborator

rustbot commented Dec 30, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Dec 30, 2023
@Mark-Simulacrum
Copy link
Member

r=me when MCP is ready to go

@ChrisDenton
Copy link
Contributor

Note that x.py clippy compiler also checks the standard library, because it needs to be checked before the compiler. This happens even with x.py clippy --stage 0.

As this affects libs too, should this be t-libs-nominated so it can be put on the agenda for discussion?

@tgross35
Copy link
Contributor

tgross35 commented Jan 7, 2024

Should lints use the cargo lints table rather than CI config? So it's easier to check the same flags locally.

@Kobzol
Copy link
Contributor Author

Kobzol commented Jan 7, 2024

I guess that eventually we could use it, but correctness is enabled by default in Clippy (AFAIK), so we don't need to do anything special. You still need to run x.py clippy locally to see the lints that would be caught on CI.

A benefit of cargo.lints could be that x.py clippy would only show you the exact things that would be errors on CI (possibly as warnings locally). But we would have to do e.g. something like this for that to work:

[lints.clippy]
all = { level = "allow", priority = -1 }
correctness = "deny"

We would probably have to set this for all crates in compiler though.

@Nilstrieb
Copy link
Member

Needs #119449, which I've nominated.

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 21, 2024
@Kobzol Kobzol marked this pull request as ready for review February 11, 2024 17:57
@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 11, 2024

#119449 has been merged, let's see if PR CI passes.

@Kobzol
Copy link
Contributor Author

Kobzol commented Feb 11, 2024

Looks like CI is green.

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 11, 2024
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Feb 11, 2024

📌 Commit 4a2939b has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@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 Feb 11, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 12, 2024
…crum

Gate PR CI on clippy correctness lints

Implements part of rust-lang/compiler-team#709.

Note that `x.py clippy compiler` also checks the standard library, because it needs to be checked before the compiler. This happens even with `x.py clippy --stage 0`.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 12, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#118983 (Warn on references casting to bigger memory layout)
 - rust-lang#119451 (Gate PR CI on clippy correctness lints)
 - rust-lang#120273 (compiletest: few naive improvements)
 - rust-lang#120889 (Implement Instant for UEFI)
 - rust-lang#120938 (Implement sys/thread for UEFI)
 - rust-lang#120950 (Fix async closures in CTFE)
 - rust-lang#120958 (Dejargonize `subst`)
 - rust-lang#120965 (Add lahfsahf and prfchw target feature)
 - rust-lang#120970 (add another test for promoteds-in-static)
 - rust-lang#120979 (Update books)

Failed merges:

 - rust-lang#120973 (allow static_mut_ref in some tests that specifically test mutable statics)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#118983 (Warn on references casting to bigger memory layout)
 - rust-lang#119451 (Gate PR CI on clippy correctness lints)
 - rust-lang#120273 (compiletest: few naive improvements)
 - rust-lang#120950 (Fix async closures in CTFE)
 - rust-lang#120958 (Dejargonize `subst`)
 - rust-lang#120965 (Add lahfsahf and prfchw target feature)
 - rust-lang#120970 (add another test for promoteds-in-static)
 - rust-lang#120979 (Update books)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 78403e8 into rust-lang:master Feb 13, 2024
11 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 13, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2024
Rollup merge of rust-lang#119451 - Kobzol:ci-pr-clippy, r=Mark-Simulacrum

Gate PR CI on clippy correctness lints

Implements part of rust-lang/compiler-team#709.

Note that `x.py clippy compiler` also checks the standard library, because it needs to be checked before the compiler. This happens even with `x.py clippy --stage 0`.
@Kobzol Kobzol deleted the ci-pr-clippy branch February 13, 2024 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants