Skip to main content

OutputArgs

Struct OutputArgs 

Source
pub struct OutputArgs {
    pub format: Vec<FormatSpec>,
    pub threshold: Option<f64>,
    pub strict: bool,
    pub lenient: bool,
    pub no_fail: bool,
    pub delta_gate: bool,
    pub minimal_view: bool,
}

Fields§

§format: Vec<FormatSpec>

Output format(s).

Accepts a single format (--format json) for stdout, or a comma- separated list to fan out a single analysis pass to multiple destinations (--format json:envelope.json,markdown:report.md). Each entry is FORMAT (stdout) or FORMAT:FILE (write to file). Multi-format invocations require every entry to specify a file — stdout cannot multiplex (issue #100).

§threshold: Option<f64>

CRAP score threshold — functions above this fail the check [default: 25]

§strict: bool

Use strict threshold (15) — for high-quality or safety-critical code

§lenient: bool

Use lenient threshold (40) — for legacy or transitional code

§no_fail: bool

Always exit 0, even when threshold violations exist.

Overrides only the exit-code translation; the underlying analysis is untouched and result.passed in JSON output still reflects the truthful pass/fail state, so consumers can detect “would have failed” even when the process exits 0. Composes with --quiet for silent success in CI. With --delta-gate, also overrides the delta-gate exit-code translation (truth still in delta.summary.passed).

§delta_gate: bool

Fail the build (exit 1) when the baseline comparison introduces new threshold violations.

Off by default — delta is informational unless this flag is set. Drives off delta.summary.passed, which is true iff new_violations == 0. Pre-existing violations (functions that already exceeded threshold in the baseline) do NOT contribute, so re-running with no code changes never trips the gate. Only meaningful with --baseline. Composes with --no-fail (which overrides BOTH gates).

§minimal_view: bool

Omit the denormalized view.shown row array from JSON output.

Payload-size escape hatch for very large codebases. The envelope’s result block (the gate) is unaffected; view.spec, view.eligible_count, view.truncated, and view.shown_summary remain so consumers retain full scope context. Only meaningful with --format json.

Trait Implementations§

Source§

impl Args for OutputArgs

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl Debug for OutputArgs

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for OutputArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.