Spectre.Doctor.Report (Spectre v0.3.3)

Copy Markdown View Source

Contract-v1 privacy-safe result returned by Spectre.Doctor.

Summary

Functions

Returns whether the report should produce a successful command exit.

Formats a report as terminal text or JSON.

Returns the stable JSON-safe contract-v1 map.

Types

t()

@type t() :: %Spectre.Doctor.Report{
  checks: term(),
  contract_version: term(),
  spectre_version: term(),
  status: term(),
  summary: term()
}

Functions

acceptable?(report, opts \\ [])

@spec acceptable?(
  t(),
  keyword()
) :: boolean()

Returns whether the report should produce a successful command exit.

format(report, format \\ :text)

@spec format(t(), :text | :json) :: String.t()

Formats a report as terminal text or JSON.

to_map(report)

@spec to_map(t()) :: map()

Returns the stable JSON-safe contract-v1 map.