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
impl ToolValidation
Sourcepub fn missing_tools(&self) -> Vec<&'static str>
pub fn missing_tools(&self) -> Vec<&'static str>
Checkers that were not installed.
Sourcepub fn fully_checked(&self) -> bool
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.
Sourcepub fn into_result(self) -> Result<(), Vec<String>>
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.
Sourcepub fn into_result_with_strictness(
self,
strict: bool,
) -> Result<(), Vec<String>>
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.