pub struct CheckArgs {
pub paths: Vec<PathBuf>,
pub format: OutputFormat,
pub fail_on: Vec<Category>,
pub offline: bool,
pub cooldown: Option<u64>,
pub config: Option<PathBuf>,
pub respect_gitignore: bool,
pub follow_symlinks: bool,
}Expand description
Arguments for deps-cli check.
Fields§
§paths: Vec<PathBuf>Paths to walk. Defaults to the current directory when empty.
format: OutputFormatOutput format.
fail_on: Vec<Category>Comma-separated categories that make the run exit with code 1
(outdated,yanked,vulnerable,unsatisfiable,mutable-ref,license,deprecated).
Defaults to vulnerable,yanked,unsatisfiable when omitted (FR-010). A finding that
matches none of the seven categories (e.g. an unresolved/unknown package) is always
reported but can never fail a run through this flag.
offline: boolServe only already-cached registry data; never make a new outbound request.
cooldown: Option<u64>Overrides freshness.cooldown_secs for this run. Accepts a bare number of seconds
or a suffixed duration (30m, 12h, 3d).
config: Option<PathBuf>Path to a deps.toml config file. Defaults to ./deps.toml when present, and to
built-in defaults otherwise.
respect_gitignore: boolRestore .gitignore/.ignore awareness during the walk (git’s own default
behavior). check does not respect either by default (issue #1109): as a CI
security gate (git checkout && deps-cli check . against an untrusted fork PR), both
files are attacker-controlled input, and a one-line addition to either would otherwise
silently remove a manifest from the scan with no warning and exit code 0. Pass this
flag only when scanning a target you trust as much as your own deps.toml.
follow_symlinks: boolFollow symlinks during the directory walk and resolve a symlinked manifest’s target for
scanning (issue #1112). A symlink whose resolved, canonicalized target falls outside the
walked root is never followed regardless of this flag — see crate::walk::walk’s doc.
When this flag is not passed (the default), a symlink to a manifest-shaped file is still
detected and reported via a warning (non-zero exit code), it is simply not resolved and
scanned.
Implementations§
Source§impl CheckArgs
impl CheckArgs
Sourcepub fn walk_paths(&self) -> Vec<PathBuf>
pub fn walk_paths(&self) -> Vec<PathBuf>
The paths to walk: Self::paths verbatim, or the current directory when empty
(FR-001).
§Examples
use clap::Parser;
use deps_cli::cli::{Cli, Command};
let cli = Cli::parse_from(["deps-cli", "check"]);
let Command::Check(args) = cli.command else {
unreachable!()
};
assert_eq!(args.walk_paths(), vec![std::path::PathBuf::from(".")]);Sourcepub fn gitignore_policy(&self) -> GitignorePolicy
pub fn gitignore_policy(&self) -> GitignorePolicy
Self::respect_gitignore translated to GitignorePolicy — the transposition-proof
type walk::walk and run_check take, so a bool never has to travel past this point.
Sourcepub fn symlink_policy(&self) -> SymlinkPolicy
pub fn symlink_policy(&self) -> SymlinkPolicy
Self::follow_symlinks translated to SymlinkPolicy — the transposition-proof
type walk::walk and run_check take, so a bool never has to travel past this point.
Trait Implementations§
Source§impl Args for CheckArgs
impl Args for CheckArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for CheckArgs
impl CommandFactory for CheckArgs
Source§impl FromArgMatches for CheckArgs
impl FromArgMatches for CheckArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for CheckArgs
impl Parser for CheckArgs
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for CheckArgs
impl RefUnwindSafe for CheckArgs
impl Send for CheckArgs
impl Sync for CheckArgs
impl Unpin for CheckArgs
impl UnsafeUnpin for CheckArgs
impl UnwindSafe for CheckArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more