Open gillyobeast opened 2 months ago
i think it's something to do with how the code compares the url for the crate against the expected url for crates.io, here: https://github.com/EmbarkStudios/cargo-deny/blob/5da8b8565620c0987d6baa4345fa4d033b5e7819/src/diag/krate_spans.rs#L807-L817
Describe the bug
the new
workspace-dependency.unused
setting reports false positives when you proxy crates.io via another cargo repository.i found this running against an internal artifactory mirror of crates.io, which for obvious reasons i can't use for a reproduction, but using a random (out of date) mirror i found on the web also reproduces it.
minimal repro repo available here
To reproduce
.cargo/config.toml
in the root of a cargo project:[source.crates-io]
comment out below line (stop proxying crates.io via mirror) to fix issue
replace-with = "mirror"
❯ cargo deny check bans error[unused-workspace-dependency]: workspace dependency is declared, but unused ┌─ /Users/lake.armitage/personal/workspace-lint-false-positive-repro/Cargo.toml:12:1 │ 12 │ wiremock = "0.5" │ ━━━━━━━━ unused workspace dependency
bans FAILED