Skip to content

feat(cli): add --report and --report-path to write report files - #124

Merged
guarnz merged 1 commit into
mainfrom
feat/report-files
Nov 10, 2026
Merged

guarnz merged 1 commit into
mainfrom
feat/report-files

Conversation

@guarnz

@guarnz guarnz commented Nov 10, 2026

Copy link
Copy Markdown
Owner

What

--report writes the report to files and keeps the table on screen; --report-path says where.

deadvalues scan apps --report                      # scan-2026-11-10.json, .md and .sarif
deadvalues scan apps -o sarif --report             # table on screen, scan-2026-11-10.sarif
deadvalues scan apps --report-path reports/        # reports/scan-2026-11-10.json, .md and .sarif
deadvalues scan apps --report-path reports/home    # reports/home.json, .md and .sarif
deadvalues scan apps --report-path results.sarif   # that file only
  • -o takes several formats, comma-separated, with --report: json, markdown and sarif go to files, table or github stays on screen, and the table is the default. With no file format in -o, --report writes all three (explain: json and Markdown).
  • Files are named <command>-<date>.<ext>; a second run on the same day replaces them, and the time is in the report. Missing directories are created. Each file written is printed on stderr.
  • Without --report, -o takes one format on stdout as before, so -o json | jq keeps working.
  • --output-file is still accepted but hidden from --help. The GitHub Action keeps using it, so it still works with older releases.

Why

--output-file mixed two things in one flag: a plain path replaced stdout with the -o format, and FORMAT=FILE added a file. Getting the usual CI set (table in the log, Markdown for the pull request, SARIF for code scanning) took one --output-file FORMAT=FILE per file, with names chosen by hand.

Type

  • Bug fix
  • Feature
  • Refactor
  • Build or CI
  • Docs

Checklist

  • Tests pass (go test ./...)
  • Docs updated (README, docs/, or docs/cli via gendocs)
  • No secrets committed

@guarnz guarnz added this to the v0.2.0 milestone Nov 10, 2026
@github-actions github-actions Bot added action The GitHub Action and its pull request report cli Commands and flags enhancement New feature or improvement labels Nov 10, 2026
@sonarqubecloud

Copy link
Copy Markdown

@guarnz
guarnz merged commit 41824b6 into main Nov 10, 2026
13 checks passed
@guarnz
guarnz deleted the feat/report-files branch November 10, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action The GitHub Action and its pull request report cli Commands and flags enhancement New feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant