Closed stormshield-gt closed 3 weeks ago
You can use -D
just as with cargo clippy to deny specific lints, so using cargo deny check -D unused-wrapper bans
or cargo deny check -D all bans
could be used in CI.
Thank you a lot for your quick answer, cargo deny check -D unused-wrapper bans
works for me.
I noticed 2 small things, that I think it might be worth sharing:
cargo deny check -D all bans
is not working for me. Indeed All
is not a variant of the bans::Code enum
. I just read really quickly through the code, maybe there is another way to set the all
somewhereSorry I misremembered, it's -D warnings|allowed
.
Perfect, thanks again for your help!
Is your feature request related to a problem? Please describe.
Since https://github.com/EmbarkStudios/cargo-deny/issues/405 we have a way to detect unused deny
wrappers
which is great. However, this detection only emits warning and don't fail the process when doingcargo deny check ban
, so it's easy to ignore it in CI.Describe the solution you'd like
It would be great if it we could have the possibility to turn those into hard error. Like the "warning as error" of clippy
Describe alternatives you've considered
I could hack a bash script that detects if something was output to stderr and failed in that the case.
But I don't think it's a reliable solution