LemonCore. Doctor. Report
(lemon_core v0.1.0)
View Source
Aggregates diagnostic check results and renders them as text or JSON.
Usage
checks = [...list of %Check{}...]
report = Report.from_checks(checks)
Report.print(report) # human-readable output
Report.print(report, verbose: true) # include pass/skip details
Report.to_json(report) # JSON string
Report.ok?(report) # true if no failures
Summary
Functions
Builds a Report from a list of Check structs.
Returns true when no checks have :fail status.
Returns the overall status atom (:pass, :warn, or :fail).
Prints a formatted report to the Mix shell.
Serialises the report to a JSON string.
Types
@type t() :: %LemonCore.Doctor.Report{ checks: [LemonCore.Doctor.Check.t()], fail: non_neg_integer(), pass: non_neg_integer(), skip: non_neg_integer(), warn: non_neg_integer() }
Functions
@spec from_checks([LemonCore.Doctor.Check.t()]) :: t()
Builds a Report from a list of Check structs.
Returns true when no checks have :fail status.
@spec overall(t()) :: :pass | :warn | :fail
Returns the overall status atom (:pass, :warn, or :fail).
Prints a formatted report to the Mix shell.
Options
:verbose- include pass and skip results (default: false)
Serialises the report to a JSON string.