Closed mkatychev closed 9 months ago
Thanks for opening an issue. Does it work if you run cargo-machete --with-metadata
? this will look for crate renamings like this one, if I remember correctly.
Thanks for the help @bnjbvr that does ameliorate it!
It would be nice if there was an option to whitelist dependencies for generated code:
[dependencies]
prost-types.workspace = true
[build-dependencies]
prost-types.workspace = true
prost-types
gets flagged in this case because the generated code gets sent to OUT_DIR
. I'm assuming scanning rust code generated by build.rs
in OUT_DIR
is a bit of a lift right now though.
Any dependency where the package name is different from the lib name (
use pkg::*;
) is marked as a false positive, this seems to be consistent across the board:Example: https://github.com/maciejhirsz/tiny-bip39/blob/master/Cargo.toml#L1-L19