Renders analysis results for humans or machines.
human/2 produces the terminal report shown by mix temper.report;
json/2 produces a machine-readable payload (the shape a future
ingestion service will accept). Both are pure: analysis data and
read stats in, a string out — printing is the mix task's job.
Summary
Types
@type stats() :: %{ source: String.t(), files: non_neg_integer(), records: non_neg_integer(), corrupt: non_neg_integer(), skipped: non_neg_integer() }
What was read to produce the report, for the footer/payload.
Functions
@spec human(Temper.Analysis.report(), stats(), keyword()) :: String.t()
Renders the human-readable report.
Flaky tests come first (sorted by the analysis), then suspects. With no history files at all, prints setup instructions instead.
Options:
:by_app— group findings by umbrella child app, derived from each finding's file path (the segment afterapps/). Findings whose path carries noapps/<name>/segment group under"(root)". Defaultfalse.
@spec json(Temper.Analysis.report(), stats()) :: String.t()
Renders the report as a JSON payload (single line).
Every finding carries a derived "app" field: the umbrella child
app parsed from its file path, or null when there is none.