Skip to main content

:::tip Looking for the recipe? See Workflows → Track trends across releases for the task-driven guide. This page is the reference. :::

zuit diff

zuit diff <FROM> <TO>

Use zuit diff to compare two analysis results and see exactly what changed: which findings are new, which were resolved, and which are still present. Both arguments can be paths to JSON report files saved with zuit analyze --format json, or scan IDs from your saved scan history.

When to use this​

  • Review the quality impact of a pull request before merging.
  • Confirm that a fix actually resolved a reported finding.
  • Detect regressions between two releases or branches.

Arguments​

ArgumentDescription
<FROM>Baseline report: path to a JSON file produced by zuit analyze --format json.
<TO>Comparison report: path to a JSON file produced by zuit analyze --format json.

Status: Passing scan IDs (instead of file paths) is not yet implemented in zuit. Both arguments must be paths to JSON files produced by zuit analyze --format json.

Output​

The diff groups findings into three sets:

SetMeaning
newFindings in <TO> but not in <FROM>
resolvedFindings in <FROM> but not in <TO> (fixed or removed)
persistingFindings present in both reports

Two findings are considered the same if they share the same rule ID and file. Minor line-number drift (e.g. from reformatting) does not cause a finding to appear as new.

Options​

FlagDefaultDescription
--format <FORMAT>jsonOutput format: json or terminal.
-h, --helpPrint help.

Examples​

Diff two saved JSON files:

zuit diff baseline.json current.json

Diff two saved JSON files using scan IDs is not yet supported — use file paths for both arguments.

See also​