From 68da7064409f2e49ac1724d8586ddb0184a5c55a Mon Sep 17 00:00:00 2001 From: JamBalaya56562 Date: Sun, 2 Aug 2026 11:02:35 +0900 Subject: [PATCH] chore: lint test and bench targets with clippy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `lint:clippy` ran `cargo clippy --all --all-features -- -D warnings`, which covers lib and bin targets only. Tests and benches were never linted, so lint accumulated there unnoticed: turning `--all-targets` on surfaced 17 findings — 13 deprecated `criterion::black_box` calls in the bench, plus `clippy::unnecessary_get_then_check` and `clippy::manual_contains` in tests. Those were fixed in #763, but nothing stops the same thing happening again while the gate stays narrow. mise runs both forms in CI (.github/workflows/test.yml): cargo clippy -- -D warnings cargo clippy --all-features --all-targets -- -D warnings and its AGENTS.md makes `cargo clippy --workspace --all-features --all-targets -- -D warnings` passing without `#[allow]` exclusions an explicit rule. This brings usage to the same bar. Newly covered: `lib/benches/parse.rs`, the integration tests under `lib/tests/`, `cli/tests/` and `clap_usage/tests/`, and every `#[cfg(test)] mod tests` — the last of which the lib target never enabled `cfg(test)` for. `lint-fix` is deliberately left alone. `render:usage-cli-completions` calls it for `cargo fmt` and `prettier -w`, and widening the `clippy --fix` inside it would add a full test and criterion build to `mise run render` for no benefit. mise keeps its fix side narrower than its check side for the same reason. --- mise.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mise.toml b/mise.toml index ccc1c924..780ab7f1 100644 --- a/mise.toml +++ b/mise.toml @@ -69,7 +69,7 @@ run = 'actionlint' [tasks."lint:prettier"] run = "prettier -c ." [tasks."lint:clippy"] -run = 'cargo clippy --all --all-features -- -D warnings' +run = 'cargo clippy --all --all-features --all-targets -- -D warnings' [tasks."lint:fmt"] run = 'cargo fmt --all -- --check' [tasks."lint:semver"]