cargo-machete
cargo-machete copied to clipboard
How to exclude crates not part of the root crate from analysis
I have a project that includes a git submodule for .proto
files.
Inside of the submodule there is an example rust crate that has nothing to do with the main repository I am running cargo machete
on.
How can I exclude this unrelated crate from the cargo machete
analysis?
I can explicitly pass the paths to the projects I want to include, but I just don't like having to do so.
I see multiple possible implementations:
- only analyze crates that are members of the workspace if it exists
- allow adding paths or directories to ignore in the file system discovery
Thanks for opening an issue! For background: the --ignore-target
option was introduced as a minimal way to ignore directories, so instead we could just use a plain list of directories that we want to ignore, instead, as a generalization of the --ignore-target
. That is your option 2, if I understand correctly! Is this something you'd be interested in implementing too?