From 3a315ae75d22fdeb34fda281cbd640d1286398f2 Mon Sep 17 00:00:00 2001 From: Edouard Vanbelle Date: Mon, 27 Apr 2026 09:29:45 +0200 Subject: [PATCH] chore(rust): use same params for clippy as the CI + correct clippy warnings --- CLAUDE.md | 4 ++-- README.md | 2 +- justfile | 4 ++-- src/infrastructure/services/dedup_service.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 54d05e58..5135e3d3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -37,8 +37,8 @@ Database setup: `docker compose up -d postgres` — schema is applied automatica Always run these before committing, in this order: ```bash -cargo fmt --all # Auto-format -cargo clippy -- -D warnings # Lint (must pass with zero warnings) +cargo fmt --all # Auto-format +cargo clippy --all-features --all-targets -- -D warnings # Lint (must pass with zero warnings) ``` CI enforces both — commits that fail either check will not merge. diff --git a/README.md b/README.md index 56b8b479..0cd94fd2 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ Integration docs: [OIDC setup](docs/config/oidc.md) · [OIDC architecture](docs/ ```bash cargo fmt --all --check -cargo clippy -- -D warnings +cargo clippy --all-features --all-targets -- -D warnings cargo test --workspace ``` diff --git a/justfile b/justfile index 7282a748..7d259b35 100644 --- a/justfile +++ b/justfile @@ -31,11 +31,11 @@ fmt-check: cargo fmt --all --check lint: - cargo clippy -- -D warnings + cargo clippy --all-features --all-targets -- -D warnings check: cargo fmt --all - cargo clippy -- -D warnings + cargo clippy --all-features --all-targets -- -D warnings openapi: cargo run --bin generate-openapi diff --git a/src/infrastructure/services/dedup_service.rs b/src/infrastructure/services/dedup_service.rs index 77e49551..55f9d5f0 100644 --- a/src/infrastructure/services/dedup_service.rs +++ b/src/infrastructure/services/dedup_service.rs @@ -1517,7 +1517,7 @@ mod tests { let is_last = i == chunks.len() - 1; if !is_last { assert!( - chunk.length >= CDC_MIN_CHUNK as usize, + chunk.length >= CDC_MIN_CHUNK, "non-last chunk {} too small: {} < {}", i, chunk.length, @@ -1525,7 +1525,7 @@ mod tests { ); } assert!( - chunk.length <= CDC_MAX_CHUNK as usize, + chunk.length <= CDC_MAX_CHUNK, "chunk {} too large: {} > {}", i, chunk.length,