pub enum Outcome {
Passed,
Failed,
Warned,
Fixed,
Unavailable,
}Expand description
What a check meant, as opposed to what it printed.
The fourth variant is the point. Fifteen sites used to warn and return 0,
collapsing two different situations: “I ran and found something you should
know” and “I could not run at all”. ruff config found but no ruff binary
was indistinguishable from ruff running clean — to the dispatcher, and to
the dashboard. A repository where a check has silently never executed read
as one where it passes.
That is the same invisibility hook.skip had before skipped checks were
announced, and it took three PRs to notice there.
The check still prints its own message; this only classifies the result.
Deliberately NO Default. It used to be Failed, to fill the slot of a
check whose thread died — a real rule, but Default means “the neutral
value” to every reader and to every #[derive(Default)] that might later
contain one. The rule is now written where it applies, in the runner.
Variants§
Passed
Failed
Ran, found a problem. Whether that blocks is Severity, not this.
Warned
Ran, found something worth saying, which does not block.
Fixed
Ran, found a problem, and REPAIRED it. The commit proceeds with the
repair staged, which is neither Passed (something happened, and the
author should know their files changed) nor Failed.
COULD NOT RUN — a tool is missing, or the opt-in config is absent.