From 443956b8e32548422484ec20f86da84e358046cc Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 6 Sep 2025 18:51:07 +0200 Subject: [PATCH] ci: run clippy without --features=embed-data too That configuration is already tested, but not clippy-checked yet. This sometimes causes things like unused imports linger on master. Let's at least enable clippy for stable Rust. Also do the same build_tools/check.sh; since that script already runs "cargo test --no-default-features", this shouldn't add much work, though I didn't check that. --- .github/workflows/rust_checks.yml | 5 ++++- build_tools/check.sh | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust_checks.yml b/.github/workflows/rust_checks.yml index d83d99be4..6f78a1d14 100644 --- a/.github/workflows/rust_checks.yml +++ b/.github/workflows/rust_checks.yml @@ -18,6 +18,9 @@ jobs: clippy-stable: runs-on: ubuntu-latest + strategy: + matrix: + features: ["", "--no-default-features"] steps: - uses: actions/checkout@v3 - uses: ./.github/actions/rust-toolchain@stable @@ -27,7 +30,7 @@ jobs: run: | sudo apt install gettext - name: cargo clippy - run: cargo clippy --workspace --all-targets -- --deny=warnings + run: cargo clippy --workspace --all-targets ${{ matrix.features }} -- --deny=warnings clippy-msrv: runs-on: ubuntu-latest diff --git a/build_tools/check.sh b/build_tools/check.sh index 3bee699d8..329f49110 100755 --- a/build_tools/check.sh +++ b/build_tools/check.sh @@ -41,7 +41,9 @@ template_file=$(mktemp) FISH_GETTEXT_EXTRACTION_FILE=$template_file cargo build --workspace --all-targets --features=gettext-extract if $lint; then PATH="$build_dir:$PATH" "$repo_root/build_tools/style.fish" --all --check - cargo clippy --workspace --all-targets + for features in "" --no-default-features; do + cargo clippy --workspace --all-targets $features + done fi cargo test --no-default-features --workspace --all-targets cargo test --doc --workspace