Skip to content
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

How to exclude crates not part of the root crate from analysis #49

Open
mickvangelderen opened this issue Nov 1, 2022 · 1 comment
Open

Comments

@mickvangelderen
Copy link
Contributor

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:

  1. only analyze crates that are members of the workspace if it exists
  2. allow adding paths or directories to ignore in the file system discovery
@mickvangelderen mickvangelderen changed the title How to exclude crates not part of the root crate How to exclude crates not part of the root crate from analysis Nov 1, 2022
@bnjbvr
Copy link
Owner

bnjbvr commented Nov 1, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants