est31 / cargo-udeps

Find unused dependencies in Cargo.toml
Other
1.76k stars 46 forks source link

Support target_os #123

Open Porges opened 2 years ago

Porges commented 2 years ago

It seems like target_os is not supported, leading to false positives.

faern commented 2 years ago

Maybe you mean something different than what I experience. But I get false negatives due to this. If I run cargo udeps --all-targets on Linux, in a crate with:

[target.'cfg(target_os="macos")'.dependencies]
an_unused_dependency = "1"

It will not find it. Is there any way to make cargo udeps check all targets. Sorry if this is not at all what the issue is about.