From 8959071f3ec3b0f7dc0e81786dda757bfccdacfb Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Thu, 17 Sep 2026 14:54:58 +0800 Subject: [PATCH 1/4] fix(ci): use `--locked` for clippy-related inovcations --- .github/workflows/clippy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index acf3d2d097a..ce09d1bb92d 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -19,7 +19,7 @@ jobs: sh rustup-init.sh -y --default-toolchain none rustup target add x86_64-unknown-linux-gnu - name: Check clippy configs all match - run: cargo run --manifest-path ci/Cargo.toml -- clippy-config-check + run: cargo run --locked --manifest-path ci/Cargo.toml -- clippy-config-check run_clippy: @@ -41,5 +41,5 @@ jobs: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh sh rustup-init.sh -y --default-toolchain none - name: clippy - run: cargo clippy --manifest-path ${{ matrix.package }}/Cargo.toml + run: cargo clippy --locked --manifest-path ${{ matrix.package }}/Cargo.toml From 01891c74765af5c2910091e6ea23a42410b2d64c Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Thu, 17 Sep 2026 14:59:19 +0800 Subject: [PATCH 2/4] chore(ci): remove unnecessary `rustup` target add The toolchain config file already makes `rustup` add the target by default. --- .github/workflows/clippy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index ce09d1bb92d..92e385d135c 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -17,7 +17,6 @@ jobs: run: | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh sh rustup-init.sh -y --default-toolchain none - rustup target add x86_64-unknown-linux-gnu - name: Check clippy configs all match run: cargo run --locked --manifest-path ci/Cargo.toml -- clippy-config-check From 24ba9a5b4c9fd45f57e6e37c883cef873c9c979b Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Thu, 17 Sep 2026 15:00:07 +0800 Subject: [PATCH 3/4] fix(ci): also run clippy on `check_diff` --- ci/src/clippy_config_check.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/src/clippy_config_check.rs b/ci/src/clippy_config_check.rs index 011ffe4ef18..c4c59f692f6 100644 --- a/ci/src/clippy_config_check.rs +++ b/ci/src/clippy_config_check.rs @@ -4,6 +4,7 @@ use itertools::Itertools; const CARGO_TOMLS: &[&'static str] = &[ "Cargo.toml", + "check_diff/Cargo.toml", "ci/Cargo.toml", "config_proc_macro/Cargo.toml", ]; From 1835bfd56fb74ca0c540084b34708813fed17ee1 Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Thu, 17 Sep 2026 15:00:45 +0800 Subject: [PATCH 4/4] chore(check_diff): use similar clippy config --- check_diff/Cargo.toml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/check_diff/Cargo.toml b/check_diff/Cargo.toml index 18a4aa90d6c..b18aa0c39d0 100644 --- a/check_diff/Cargo.toml +++ b/check_diff/Cargo.toml @@ -15,3 +15,17 @@ diffy = "0.4.0" crossbeam-channel = "0.5.15" ignore = "0.4.25" toml = "1.1" + +[lints.clippy] +# allow all rules with a low priority .. +all = { level = "allow", priority = -1 } +# so we can pick out an exact subset of rules to deny +correctness = "deny" +char_lit_as_u8 = "deny" +four_forward_slashes = "deny" +non_minimal_cfg = "deny" +print_literal = "deny" +same_item_push = "deny" +single_char_add_str = "deny" +to_string_in_format_args = "deny" +unconditional_recursion = "deny"