Skip to main content

Module report

Module report 

Source
Expand description

Rendering of Validity verdicts as text, JSON, SARIF 2.1.0, or Markdown.

Plain text and JSON are emitted without a serialization framework: a single, audited json_escape routine handles string escaping so the output is always valid JSON regardless of the bytes present in a file path.

SARIF and Markdown follow skills/rust-sarif.md: SARIF 2.1.0 is produced and strict-validated with sarif_rust, and Markdown is derived from that SARIF via sarif_to_md_core. This keeps the structured output spec-compliant for CI ingestion, code review, and compliance tooling.

Structs§

Finding
A single input’s validation outcome, carried through to whichever output format is rendered at the end of a run.

Enums§

OutputFormat
Output format selected on the command line.
ReportError
Errors from building or converting structured (SARIF / Markdown) reports.

Functions§

build_sarif
Build a spec-compliant, strict-validated SARIF 2.1.0 document from findings.
json_block
Render every finding as a JSON array (trailing newline).
json_escape
Escape a string for safe inclusion inside a JSON string literal.
json_record
Render a single verdict as a JSON object (no trailing newline).
sarif_to_markdown
Convert a SARIF JSON document to GitHub-Flavored Markdown, validating that the result is non-empty and carries some structure.
text_block
Render every finding as the human-readable text block (trailing newline).
text_line
Render a single verdict as one human-readable line (no trailing newline).