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

Use exit code to signal if there are unused dependencies #25

Merged
merged 1 commit into from
May 1, 2022
Merged

Use exit code to signal if there are unused dependencies #25

merged 1 commit into from
May 1, 2022

Conversation

Bromeon
Copy link
Contributor

@Bromeon Bromeon commented Apr 30, 2022

Addresses part of #13.

The application now returns 0 if no unused dependencies are found, 1 if unused dependencies are found, and 2 for any other errors (propagated via Result).

What could still be improved in a separate PR:

  • Error handling (it looks like syntax errors in some Cargo.toml files are skipped instead of causing an error; not sure if intended)
  • Machine-readable, stable output

Copy link
Owner

@bnjbvr bnjbvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice nice, thanks!

@bnjbvr bnjbvr merged commit 691cb75 into bnjbvr:main May 1, 2022
@Bromeon Bromeon deleted the feature/exit-code branch May 1, 2022 17:20
@Bromeon
Copy link
Contributor Author

Bromeon commented May 8, 2022

Somewhat related, do you plan on releasing a new cargo-machete binary soon, which includes those semantics?
I plan on using it in CI, and having the exit code would help greatly.

If not, I'll go with cargo install --git for now; this might not work well with caching artifacts though.

@bnjbvr
Copy link
Owner

bnjbvr commented May 8, 2022

Yep that's a good idea, will do that in the upcoming days!

@bnjbvr
Copy link
Owner

bnjbvr commented May 9, 2022

And now done, published as 0.3.0!

@Bromeon Bromeon mentioned this pull request May 13, 2022
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

Successfully merging this pull request may close these issues.

2 participants