pub enum FormatArg {
Table,
Json,
Markdown,
Csv,
Sarif,
Advice,
ScorecardRow,
Html,
GithubAnnotations,
}Expand description
Output format for the CRAP report.
Variants§
Table
Human-readable table with ANSI colors
Json
Nested JSON envelope (pipe to jq for filtering)
Markdown
GitHub-flavored Markdown — paste into PR comments or issues
Csv
RFC 4180 CSV — one row per function, no summary
Sarif
SARIF v2.1.0 — for GitHub Code Scanning (upload-sarif@v3)
Advice
Agent-oriented JSON with Diagnostic remediation hints (experimental)
ScorecardRow
Single Row::CrapDelta JSON object — for scorecard
aggregator consumption (locked schema fragment at
crates/crap4rs/tests/fixtures/scorecard/schema.json,
schema_version=1; see docs/scorecard-row-contract.md).
Html
Self-contained HTML dashboard with summary stats, risk distribution, and per-file collapsible function tables. Inline CSS, no external assets, mobile-responsive.
GithubAnnotations
GitHub Actions inline annotations — emits ::warning workflow
commands so threshold-exceeding findings render inline on the
PR “Files Changed” tab. Universal, free, no GHAS dependency.