Skip to main content

ToolValidation

Enum ToolValidation 

Source
pub enum ToolValidation {
    Unsupported,
    Attempted(Vec<ToolOutcome>),
}
Expand description

Every checker’s verdict for one generated file.

Variants§

§

Unsupported

No tool-based validator exists for this backend’s language.

Distinct from “the tools are missing”: Java, C#, Elixir and Rust have no validator written for them at all, and reporting that as a skip would suggest installing something would help.

§

Attempted(Vec<ToolOutcome>)

A validator exists; one entry per checker it tried to run.

Implementations§

Source§

impl ToolValidation

Source

pub fn errors(&self) -> Vec<&str>

Findings from the checkers that actually ran.

Source

pub fn missing_tools(&self) -> Vec<&'static str>

Checkers that were not installed.

Source

pub fn tools_run(&self) -> Vec<&'static str>

Checkers that ran to completion.

Source

pub fn fully_checked(&self) -> bool

Whether every checker this validator knows about actually ran.

False for Self::Unsupported: nothing checked the code, so claiming it was fully checked would be the same lie in a different shape.

Source

pub fn into_result(self) -> Result<(), Vec<String>>

Collapse to pass/fail under the current strict_mode_enabled policy.

Outside strict mode a missing tool is tolerated. Inside it, a missing tool is a failure – that is what stops a checker from quietly falling out of CI and taking its coverage with it.

Source

pub fn into_result_with_strictness( self, strict: bool, ) -> Result<(), Vec<String>>

Self::into_result with the policy passed explicitly, so tests can exercise both modes without mutating process-global environment state (which races under cargo test’s thread-per-test execution).

Self::Unsupported is deliberately not a strict-mode failure. Strict mode exists to catch a checker that fell out of the CI image, and every one of its failures should be fixable by installing something. A language with no validator written for it is a real gap – Java, C#, Elixir and Rust are all in it – but no CI configuration closes it, so failing here would leave a permanently red build with no action attached. That gap is tracked by an explicit inventory test (backends_with_no_tool_validator_are_a_known_and_shrinking_set in tests/tool_validation.rs) which fails when the set changes in either direction, rather than by a signal nobody can act on.

Trait Implementations§

Source§

impl Clone for ToolValidation

Source§

fn clone(&self) -> ToolValidation

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ToolValidation

Source§

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

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

impl Eq for ToolValidation

Source§

impl PartialEq for ToolValidation

Source§

fn eq(&self, other: &ToolValidation) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ToolValidation

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.