Firebreak.Report (Firebreak v0.1.0)

Copy Markdown View Source

Renders an Firebreak.Analysis as human-readable text or as JSON (the CI artifact / handoff format).

Summary

Functions

Drop findings below the given severity (nil = keep all).

GitHub Actions workflow commands — one annotation per finding, so findings show up inline on the PR diff. Severity maps to error (high) / warning (medium) / notice (low, info). Paths are emitted as-is; in CI they're relative to the repo root, which is what GitHub needs to attach the annotation to the diff.

A single self-contained HTML page: the tiered findings followed by the supervision + coupling graph (rendered client-side from Mermaid via CDN).

Render the text report. By default it's high-signal: primary findings in full, secondary (structural/advisory) findings only at :medium+ with the rest collapsed to a count. Pass all: true to show everything.

Functions

filter_min_severity(a, sev)

@spec filter_min_severity(Firebreak.Analysis.t(), Firebreak.Finding.severity() | nil) ::
  Firebreak.Analysis.t()

Drop findings below the given severity (nil = keep all).

github(analysis)

@spec github(Firebreak.Analysis.t()) :: String.t()

GitHub Actions workflow commands — one annotation per finding, so findings show up inline on the PR diff. Severity maps to error (high) / warning (medium) / notice (low, info). Paths are emitted as-is; in CI they're relative to the repo root, which is what GitHub needs to attach the annotation to the diff.

html(a)

@spec html(Firebreak.Analysis.t()) :: String.t()

A single self-contained HTML page: the tiered findings followed by the supervision + coupling graph (rendered client-side from Mermaid via CDN).

json(a)

@spec json(Firebreak.Analysis.t()) :: String.t()

text(a, opts \\ [])

@spec text(
  Firebreak.Analysis.t(),
  keyword()
) :: String.t()

Render the text report. By default it's high-signal: primary findings in full, secondary (structural/advisory) findings only at :medium+ with the rest collapsed to a count. Pass all: true to show everything.