Skip to main content

fallow_report_protocol/
lib.rs

1//! The language-neutral report contract of the fallow command-line tools.
2//!
3//! This crate holds the types that every fallow report shares: the JSON error
4//! document, the verdict of a gate, and the map of gate verdicts. A tool that emits a fallow report
5//! depends on this crate, so two tools cannot write a different shape for the
6//! same member.
7//!
8//! The crate depends on no other fallow crate and on no JavaScript type. The
9//! `schema` feature derives `schemars::JsonSchema` for each type.
10//!
11//! The crate version follows the fallow release. The wire version is
12//! [`REPORT_PROTOCOL_VERSION`].
13//!
14//! User documentation is on [`fallow report`](https://fallow.tools/docs/cli/report/).
15#![warn(missing_docs)]
16#![cfg_attr(
17    test,
18    allow(
19        clippy::expect_used,
20        reason = "tests use expect to keep serialization assertions concise"
21    )
22)]
23
24mod error_envelope;
25pub mod exit_code;
26mod gate;
27
28pub use error_envelope::ErrorOutput;
29pub use gate::{GateFile, GateFileReason, GateOutcome, GateOutcomes, GateStatus};
30
31/// The version of the wire contract that this crate describes.
32///
33/// A change that removes a member or changes the type of a member increments
34/// this value. An additive optional member does not change it.
35///
36/// No fallow report writes this value yet. It is for tools that consume this
37/// crate.
38pub const REPORT_PROTOCOL_VERSION: u32 = 1;