pub struct CheckArgs {
pub paths: Vec<PathBuf>,
pub staged: bool,
pub diff: Option<String>,
pub tip: Option<String>,
pub format: OutputFormat,
pub fail_on: Option<Severity>,
}Fields§
§paths: Vec<PathBuf>Files or directories to check. Duplicates and overlaps are collapsed,
so drep check a.rs . analyzes a.rs once.
staged: boolCheck the files staged for commit. For a pre-commit hook.
diff: Option<String>Check the files changed since REF, e.g. origin/main. For pre-push.
tip: Option<String>The commit to diff to. Defaults to HEAD. Only valid with --diff.
A pre-push hook needs this: git can push a ref that is not the
checked-out one (git push origin feature:feature from another branch,
or git push --all), and diffing to HEAD there reviews a different
branch and lets the pushed code through unseen.
format: OutputFormat§fail_on: Option<Severity>Also block on LLM findings at or above this severity.
Deterministic tool findings always block; this opts the LLM’s findings into gating too. Left unset, they inform without blocking - which is the useful default, because the model emits style suggestions on nearly every file.
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 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.