Open Relrin opened 4 years ago
Are you interested in that flag only for the list
subcommand or for check
as well?
Currently I'm mostly interested in this functionality for the list
subcommand. But it could be used as a part of the check
subcommand for sure :)
Cool. Let me know if you have ideas for other improvements to the list
subcommand, it was kind of added just because we have all of the information available and it was easy to add, but we don't really use that much ourselves so it hasn't gotten much attention.
Describe the solution you'd like I would like to have an overridable option in config / CLI which gives an opportunity to specify a maximum acceptable node level that can be captured and processed by the
cargo-deny
. It could be something likecargo-deny list --layout=crate --max-level=1
, so that command will output / check the crates on root (defined inCargo.toml
) plus one level for each core dependency.Describe alternatives you've considered Currently the desired group of the checked crates can be show with the usage of the
grep
command:cargo-deny list --layout=crate
|
to thegrep
command with desired regular expressions / keywords.Additional context Let's look on the following example to get the whole idea. We want to output licenses of all core dependencies declared in the
Cargo.toml
. It could something like this (the output was taken for my own terraform-sage project):With the usage of the
--max-level
option (or any other desired name) the cargo-deny filters crates by the certain nested level, so that it will output: