Expand description
Report formatting utilities for analysis results.
Exposed for snapshot testing of output formats.
Re-exports§
pub use grouping::OwnershipResolver;
Modules§
- ci
- dupes_
grouping - Per-group attribution for
fallow dupes --group-by. - grouping
- Grouping infrastructure for
--group-by owner|directory|package. - sink
- Ambient output sink for the report layer.
- suggestions
- Runtime fact adapters for
next_steps[]builders.
Structs§
- Report
Context - Shared context for all report dispatch functions.
- Walkthrough
Human Render - The three line-groups of a human
fallow review --walkthroughrender: the orientation header and final status (stderr), and the staged tour body (stdout). The entry point inaudit_brief.rsowns the stream split; this keeps the pure line builder behind the privatehumanmodule while exposing exactly what the entry point needs.
Enums§
- Level
- Severity level for human-readable output.
Functions§
- build_
compact_ lines - Build compact output lines for analysis results.
Each issue is represented as a single
prefix:detailsline. - build_
duplication_ markdown - Build markdown output for duplication results.
- build_
health_ markdown - Build markdown output for health (complexity) results.
- build_
markdown - Build markdown output for analysis results.
- build_
walkthrough_ human - Build the human walkthrough tour from the in-memory guide. Pure: no IO, no
mutation.
vieweddecorates each file row;show_clearedexpands the Cleared panel. - elide_
common_ prefix - Elide the common directory prefix between a base path and a target path.
Only strips complete directory segments (never partial filenames).
Returns the remaining suffix of
target. - emit_
json - Serialize a JSON value to pretty-printed stdout, returning the appropriate exit code.
- format_
display_ path - Format a path for human-facing display: project-relative when the path is
under
root, falling back to the full path otherwise. Always forward-slash-normalized so Windows backslashes do not leak into terminal output. - normalize_
uri - Normalize a path string to a valid URI: forward slashes and percent-encoded brackets.
- plural
- Return
"s"for plural or""for singular. - print_
class_ member_ trace - Print class-member trace results (the
--trace FILE:MEMBERfallback). - print_
clone_ trace - Print clone trace results.
- print_
cross_ reference_ findings - Print cross-reference findings (duplicated code that is also dead code).
- print_
dependency_ trace - Print dependency trace results.
- print_
duplication_ report - Print duplication analysis results in the configured format.
- print_
export_ trace - Print export trace results.
- print_
file_ trace - Print file trace results.
- print_
health_ performance - Print health pipeline performance timings. In JSON mode, outputs to stderr to avoid polluting the JSON analysis output on stdout.
- print_
health_ report - Print health (complexity) analysis results in the configured format.
- print_
impact_ closure_ trace - Print impact-closure trace results. JSON only emits the structured closure; human renders a short summary.
- print_
performance - Print pipeline performance timings. In JSON mode, outputs to stderr to avoid polluting the JSON analysis output on stdout.
- print_
results - Print analysis results in the configured format. Returns exit code 2 if serialization fails, SUCCESS otherwise.
- relative_
path - Strip the project root prefix from a path for display, falling back to the full path.
- render_
health_ score - render_
health_ trend - severity_
to_ level - split_
dir_ filename - Split a path string into (directory, filename) for display.
Directory includes the trailing
/. If no directory, returns("", filename). - strip_
root_ prefix - Recursively strip a project-root prefix from all string values in a JSON tree.
- walkthrough_
viewed_ files - The root-relative files (in
direction.order) the local ledger marked viewed against the guide’s current hash. Exposed so the markdown surface can collapse the same viewed files into Cleared that the human surface does, keeping the two formats consistent on the same on-disk--mark-viewedstate.