Skip to main content

Module explain

Module explain 

Source
Expand description

Deep-dive inspection (cargo tmt explain) and safe Rust test stub generation (--emit-todos).

Structs§

ExplainedFinding
A finding extracted from a single-package JSON, workspace JSON, or JSONL report.

Functions§

parse_findings
Parses single-package JSON, workspace JSON, or JSONL into a flat list of findings.
read_report_input
Reads report JSON/JSONL from from or from piped stdin (rejecting TTY stdin, symlinks/non-regular files without TOCTOU, and inputs larger than 16 MiB).
render_explanation_json
Renders a single finding explanation as JSON (augmented with package and ignore_comment).
render_explanation_text
Renders a human-readable deep-dive explanation for a single finding.
render_todo_stubs
Generates syntactically valid Rust #[test] #[ignore] stubs for all findings across reports. Returns None when there are zero findings.
resolve_finding
Convenience wrapper returning a single resolved finding (first when multiple findings share the same ID).
resolve_findings
Resolves query against findings with strict precedence:
write_todo_stubs
Writes Rust #[test] #[ignore] stubs exclusively to a brand-new file (O_CREAT | O_EXCL).