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()) :: 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.
@spec json(Temper.Analysis.report(), stats()) :: String.t()
Renders the report as a JSON payload (single line).