Temper.Report (temper v0.1.0)

Copy Markdown View Source

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

What was read to produce the report, for the footer/payload.

Functions

Renders the human-readable report.

Renders the report as a JSON payload (single line).

Types

stats()

@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

human(analysis, stats)

@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.

json(analysis, stats)

@spec json(Temper.Analysis.report(), stats()) :: String.t()

Renders the report as a JSON payload (single line).