pub struct CheckArgs {
pub paths: Vec<PathBuf>,
pub staged: bool,
pub diff: Option<String>,
pub tip: Option<String>,
pub pre_commit_push: bool,
pub format: OutputFormat,
pub fail_on: Option<Severity>,
pub cache_only: bool,
pub push_gate: bool,
}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.
pre_commit_push: boolRead the pushed base and tip from pre-commit’s hook environment.
Used by the published drep-check-push hook. pre-commit otherwise
passes filenames, which would make drep review whole files instead of
the hunks between PRE_COMMIT_FROM_REF and PRE_COMMIT_TO_REF.
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.
cache_only: boolUse cached LLM reviews only; never contact a provider.
An uncached file exits 3 without warming it; run a normal check to
populate the missing entry. The generated pre-push hook uses
--push-gate for the full warm-and-reconnect handshake.
push_gate: boolPrepare a push without resuming a stale remote connection.
Cached reviews pass immediately. A cold review is completed and cached,
then exits 3 so Git reconnects; repeating git push uses the cache.
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.