pub enum ToolOutcome {
Ran {
tool: &'static str,
errors: Vec<String>,
},
Missing {
tool: &'static str,
},
Failed {
tool: &'static str,
reason: String,
},
}Expand description
What happened when one external checker was pointed at a generated file.
The distinction between these variants is the whole point of this type.
Ran { errors: [] } means a real tool inspected the code and found
nothing wrong; Missing means nothing was inspected at all. Collapsing
the two – which is what returning Option<Vec<String>> did, since both
arrived at the call site as “no errors to report” – turns an uninstalled
linter into a green check mark.
Variants§
Ran
The tool was found and ran to completion. An empty errors genuinely
means this checker is satisfied.
Fields
Missing
The tool is not on PATH, so whatever it would have caught went
unchecked. Never an error outside strict mode, never a pass inside it.
Failed
The tool is installed but the harness could not run it – a temp file that would not write, a process that would not spawn.
This is neither a pass nor a skip: it is always an error, strict mode
or not. The previous implementation reached these paths through ? on
an Option and returned None, i.e. reported a broken harness as an
uninstalled tool, which then read as a pass.
Trait Implementations§
Source§impl Clone for ToolOutcome
impl Clone for ToolOutcome
Source§fn clone(&self) -> ToolOutcome
fn clone(&self) -> ToolOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more