-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a *.metadata.cargo-machete.renamed
field to configure renamed crates
#152
Comments
Thanks for proposing this. I think it's a good idea, and if you're happy to implement and document it, that would be awesome! |
This comment has been minimized.
This comment has been minimized.
jalil-salame
added a commit
to jalil-salame/cargo-machete
that referenced
this issue
Feb 13, 2025
This adds a `renamed` field that allows to map a dependency name to a crate name without using `cargo metadata`. For example: ```toml [dependencies] rustls-webpki = "0.102.8" [package.metadata.cargo-machete.renamed] rustls-webpki = "webpki" ``` This allows cargo machete to correctly mark `rustls-webpki` as used if a `use webpki` or `webpki::UsedItem` is found in the codebase.
3 tasks
This comment has been minimized.
This comment has been minimized.
jalil-salame
added a commit
to jalil-salame/cargo-machete
that referenced
this issue
Feb 15, 2025
This adds a `renamed` field that allows to map a dependency name to a crate name without using `cargo metadata`. For example: ```toml [dependencies] rustls-webpki = "0.102.8" [package.metadata.cargo-machete.renamed] rustls-webpki = "webpki" ``` This allows cargo machete to correctly mark `rustls-webpki` as used if a `use webpki` or `webpki::UsedItem` is found in the codebase.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Having an explicit renamed field should help with false positives without using
--with-metadata
, in my employer's codebase we see more false positives with--with-metadata
.I would be willing to code this feature.
Example:
The text was updated successfully, but these errors were encountered: