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

Disabling logging causes summary to be incorrect #652

Closed
matthiasbeyer opened this issue Apr 18, 2024 · 2 comments · Fixed by #657
Closed

Disabling logging causes summary to be incorrect #652

matthiasbeyer opened this issue Apr 18, 2024 · 2 comments · Fixed by #657
Labels
bug Something isn't working

Comments

@matthiasbeyer
Copy link

Describe the bug

$ cargo deny -L off  --format json check license
{"fields":{"licenses":{"errors":0,"helps":0,"notes":0,"warnings":0}},"type":"summary"}

And:

$ cargo deny --format json check license
# some more output
{"fields":{"licenses":{"errors":1,"helps":0,"notes":0,"warnings":0}},"type":"summary"}

To reproduce

cargo new --bin foo && cd foo && cargo deny -L off --format json check license && cargo deny --format json check license

cargo-deny version

cargo-deny 0.14.21

What OS were you running cargo-deny on?

Linux

Additional context

No response

@matthiasbeyer matthiasbeyer added the bug Something isn't working label Apr 18, 2024
matthiasbeyer added a commit to matthiasbeyer/actions-to-website that referenced this issue Apr 18, 2024
@Jake-Shadle
Copy link
Member

Jake-Shadle commented Apr 24, 2024

I guess I don't understand what your desired behavior is? You want to disable logging, except for errors? Why can you not use -L error?

Oh nvm I see what you are saying, disabling logging means the final summary loses all information.

@Jake-Shadle Jake-Shadle changed the title Bug: Disable logging lets errors vanish Disabling logging causes summary to be incorrect Apr 24, 2024
Jake-Shadle added a commit that referenced this issue Apr 24, 2024
Disabling logging would cause both the stats at the end, but more
crucially, the exit code (if errors occurred), to be incorrect.

Resolves: #652
@matthiasbeyer
Copy link
Author

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants