Skip to content

feat: add --quiet flag for summary-only terminal output#12

Merged
ColumbusLabs merged 2 commits into
ColumbusLabs:mainfrom
stark256-spec:feat/quiet-output-mode
Jun 1, 2026
Merged

feat: add --quiet flag for summary-only terminal output#12
ColumbusLabs merged 2 commits into
ColumbusLabs:mainfrom
stark256-spec:feat/quiet-output-mode

Conversation

@stark256-spec
Copy link
Copy Markdown

Summary

Resolves #8

  • Adds -q, --quiet flag to debtlens scan
  • In quiet mode, only the header and summary counts are printed — individual findings (file paths, rule names, evidence, suggestions) are suppressed
  • Exit code behaviour is fully preserved — --fail-on still works correctly
  • Only affects terminal format; JSON/markdown/SARIF are unaffected

Changes

  • src/cli/index.ts — add -q, --quiet option to the scan command
  • src/reporters/index.ts — thread quiet through renderReport
  • src/reporters/terminalReporter.ts — return early after summary lines when quiet: true
  • tests/reporters/terminalReporter.test.ts — new test file covering quiet and normal output (4 tests)

Test plan

  • All 69 existing tests pass
  • Quiet mode omits individual findings
  • Quiet mode still prints summary line
  • Normal mode output unchanged

@ColumbusLabs
Copy link
Copy Markdown
Owner

Thanks for the PR!

CI is currently failing because the new DebtIssue test fixture is missing the required tags field:

tests/reporters/terminalReporter.test.ts(23,7): Property 'tags' is missing ... but required in type 'DebtIssue'.

Could you add tags: [] to the test issue fixture and push an update? After that, CI should be able to continue through the rest of the workflow.

Copy link
Copy Markdown
Owner

@ColumbusLabs ColumbusLabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Looked through the diff after CI passed on Node 20 and 22.

Looks good

  • --quiet is wired CLI → renderReportrenderTerminal with an early return after the summary block.
  • Exit code / --fail-on path is untouched (only reporting changes).
  • Tests cover default output, quiet suppression, and empty-scan quiet behavior.
  • tags: [] on the fixture matches DebtIssue.

Nit (non-blocking)

  • Help text says “summary line” but quiet mode still prints the header and scan metadata lines; consider “summary only” if you want the flag description to match output.

Approved from maintainer pass — thanks for the contribution.

someshnagalla added 2 commits June 1, 2026 12:53
Closes ColumbusLabs#8

- Add `-q, --quiet` option to `debtlens scan` CLI
- Pass `quiet` through `renderReport` into `renderTerminal`
- In quiet mode, render only the header + summary line, skip all
  individual findings (file paths, rule names, evidence, suggestions)
- Exit code behaviour is unchanged — `--fail-on` still works
- Add terminalReporter.test.ts covering quiet and normal output
@ColumbusLabs ColumbusLabs force-pushed the feat/quiet-output-mode branch from 8d9c1b0 to 7dc3d8d Compare June 1, 2026 16:53
@ColumbusLabs ColumbusLabs merged commit 900af2c into ColumbusLabs:main Jun 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a summary-only quiet output mode

2 participants