From 17d0f9b416485569f62b0738436dbca1fc90701e Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 8 Nov 2024 08:37:20 -0600 Subject: [PATCH] chore(ci): Check for clippy `correctness` The fact that we don't check for `derive_ord_xor_partial_ord ` almost bit us in #14663. Instead of just enabling this one lint, I figured it'd be good to audit all of the `deny` by default lints. That is long enough that I was concerned about maintaining it (or bikeshedding which to enable or disable). All `deny` by default lints are `correctness` lints and I figure we could just enable the group. We normally opt-in to individual clippy lints. From what I remember of that conversation, it mostly stems from how liberal clippy is with making a lint `warn` by default. It also makes an unpinned CI more brittle. I figured clippy is more conservative about `deny` by default lints and slower to add them that this is unlikely to be a problem. --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 3245a05ca0b6..ee8eecdfeb5a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -121,7 +121,8 @@ rust_2018_idioms = "warn" # TODO: could this be removed? private_intra_doc_links = "allow" [workspace.lints.clippy] -all = { level = "allow", priority = -1 } +all = { level = "allow", priority = -2 } +correctness = { level = "warn", priority = -1 } dbg_macro = "warn" disallowed_methods = "warn" print_stderr = "warn"