Skip to content

Reports

LucaCappelletti94 edited this page Oct 22, 2026 · 4 revisions

The CLI prints findings as text, Markdown or JSON. Its exit status is independent of the chosen output format.

Text output

The tutorial produces output similar to the following before its reference is corrected.

refquiem: 1 removed name still mentioned, 1 mention

`refquiem_demo::render_v1` (function), deleted in f3e6824, renamed to `refquiem_demo::render_v2`
  README.md:1:7  Markdown code span

A group names the removed declaration or Cargo entry. Each location gives a repository-relative file, a one-based line and a one-based character column. The context distinguishes comments, doc comments, Markdown and string literals, including code spans, code blocks and links.

A group can have one suggested replacement or several candidates. A suggestion describes a likely move, rename or replacement inferred from introduction history. It does not establish behavioral equivalence.

Markdown

cargo refquiem --markdown prints the report as a Markdown table, the same text --github writes to the job summary, to paste into an issue, a pull request or a chat. Before the tutorial reference is corrected, the output is similar to the following.

## refquiem

1 removed name still mentioned, 1 mention

Findings and replacement suggestions require verification before editing.

| Removed name | Kind | Removed in | Status | Suggested action | Mentions |
|---|---|---|---|---|---|
| `refquiem_demo::render_v1` | function | f3e6824 | Possible rename | Verify and update the reference to `refquiem_demo::render_v2` | `README.md:1:7` |

The status is Possible move, Possible rename or Possible replacement with a suggestion, Ambiguous replacement with several candidates, which the suggested action lists, and Removed (no replacement found) otherwise. Unused suppression markers follow under their own heading. --markdown cannot be combined with --json or --github.

JSON

Before correcting the tutorial reference, run the following command.

cargo refquiem --json

The output is similar to the following, formatted here for readability.

{
  "base": null,
  "groups": [
    {
      "path": "refquiem_demo::render_v1",
      "kind": "function",
      "member": null,
      "removed_in": "f3e68246739c44ccc9de5565ec8566ac77964a6f",
      "declared_at": null,
      "suggestion": "refquiem_demo::render_v2",
      "suggested_at": {"file": "src/lib.rs", "line": 1},
      "candidates": [],
      "headline": "`refquiem_demo::render_v1` (function), deleted in f3e6824, renamed to `refquiem_demo::render_v2`",
      "mentions": [
        {
          "file": "README.md",
          "line": 1,
          "column": 7,
          "text": "refquiem_demo::render_v1",
          "context": {"source": "markdown", "kind": "code_span"},
          "replacement": "Call `refquiem_demo::render_v2` to render a page."
        }
      ]
    }
  ],
  "skipped": [],
  "unused_markers": []
}

base is the commit the range starts from, whose files the declared_at positions refer to, and null for a full-history scan like this one.

Group fields

Field Meaning
path Full removed path or Cargo entry name.
kind Removed declaration or entry kind in snake_case.
member Owning package for a Cargo entry in a multi-member workspace, otherwise null.
removed_in Full deletion commit, "working_tree" or null when the range does not establish it.
declared_at file and line where the range's starting revision declares the name, null for a full-history scan or when that revision does not declare it in a file. For a pull request this is the deleted line of its diff.
suggestion One proposed replacement path, otherwise null.
suggested_at file and line where the compared snapshot declares the suggestion, null without a suggestion or when no file declares it. A re-exported suggestion points at the item it names.
candidates Possible replacement paths when no single suggestion stands out.
headline Human-readable description, including the suggested change when available.
mentions Remaining locations in the compared snapshot.

mentions[].replacement holds the complete source line with every suggested rewrite on that line applied, or null. It is a proposed edit and requires review. An ambiguous candidate list does not supply a selected replacement.

context.source is comment, doc_comment, markdown or string_literal. context.kind is text, code_span, link or an object such as {"code_block":{"compiled":false}}.

Warnings and suppressions

skipped contains objects with dependency and reason fields. Each identifies a removed dependency whose sources could not be resolved. Its historical items were not checked. Text output prints a warning and JSON retains the resolver's reason.

unused_markers contains objects with file, line, column and name fields. These suppression names matched no finding and keep the report unclean even when groups is empty.

A report can be clean while skipped is nonempty. Check warnings before claiming that all removed dependency APIs were examined.

Exit statuses

Status Meaning
0 No stale mentions or unused markers, or --no-fail was supplied.
1 Findings or unused markers remain.
2 An error prevented completion or output, including argument and Markdown reader errors.

--no-fail preserves findings and warnings while changing a findings exit to 0. Errors still fail. --github adds workflow annotations and writes a job summary when GITHUB_STEP_SUMMARY is available. --markdown prints that job summary to stdout instead of the text report. --json selects only the JSON report, including when combined with --github.

Clone this wiki locally