est31 / cargo-udeps

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

False positive when `-` in crate name #96

Closed ralpha closed 2 years ago

ralpha commented 3 years ago

We use iso639-1 in our tool. But this is flagged as unused. This is most likely because of the - in the crate name. The actual use is iso639_1::something()

So the - is replaced with a _ in the code. If this is a common problem maybe there can a special case for all the crates that have a - in there name.

For now I just added it to the ignore list:

[package.metadata.cargo-udeps.ignore]
normal = ["iso639-1"]