From 2303aa2c7e12d9f0997548de9459347fa46a9ce6 Mon Sep 17 00:00:00 2001 From: poli0981 <127664709+poli0981@users.noreply.github.com> Date: Sat, 21 Nov 2026 23:11:20 +0700 Subject: [PATCH] fix(ci): no unused-crate inspection in Qodana for Rust One run in five on #120 reported "Unused crate: sha2", the crate env_hash is built on, on a commit that changed only a Markdown file. Every run's sanity check finds the Cargo project only partly loaded in the linter's container, and the inspection sometimes concludes from that. A baseline entry would not hold, because its fingerprint hashes neighbouring lines that Dependabot rewrites weekly. Co-Authored-By: Claude Opus 5.5 --- docs/ROADMAP.md | 6 ++++++ qodana-rust.yaml | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index c3745e1..25a934d 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -1717,6 +1717,12 @@ the same version. [#120](https://github.com/poli0981org/pipdock/pull/120). - `env remove ` answered "not on the list" for a deleted venv — the one case it exists for — because `interpreter_in` resolves only what is there. Found by its own test. - Qodana for JS flagged a non-ASCII identifier in `triage.cjs`; renamed. +- Qodana for Rust failed one run in five on #120 — the last on a commit that changed only this + file — with "Unused crate: sha2", the crate `env_hash` is built on. Every run's sanity check finds + the Cargo project only partly loaded in its container, and the unused-crate inspection sometimes + draws its conclusion from that. A baseline entry would not have held, since its fingerprint + hashes neighbouring lines Dependabot rewrites, so the inspection is excluded in + `qodana-rust.yaml`, with the reason. - The installed build — the release dry run's NSIS installer, a scratch `LOCALAPPDATA`, driven over CDP: the legal gate once on a fresh profile; an interpreter added, rescanned, updated and rolled back in a scratch venv named `myproj-env` outside the working directory; the entry kept across a diff --git a/qodana-rust.yaml b/qodana-rust.yaml index 7361bf2..fa3b3a9 100644 --- a/qodana-rust.yaml +++ b/qodana-rust.yaml @@ -53,3 +53,12 @@ exclude: - target - tools - ui + # **Unused-crate reports are a coin toss in this container.** Every run's sanity check finds the + # Cargo project only partly loaded (the Tauri build scripts above) and paths in `model.rs` and + # others unresolved; on one run in five on #120 that became "Unused crate: sha2", a crate + # `model::sha256_hex` — and so every `env_hash` — is built on, on a commit that changed a Markdown + # file. A baseline entry would not hold: its fingerprint hashes the neighbouring lines, which + # Dependabot rewrites weekly. Nothing else here checks for unused crates, so this one goes rather + # than leave a check that fails at random; `cargo machete` is the backlog row that would replace + # it. + - name: CargoUnusedDependency