Skip to content

fix(cli): validate scan roots and warn on empty scans - #12

Merged
odykyi merged 3 commits into
flisk-sh:mainfrom
arpanjot-coding:issuepilot/fix-11
Nov 16, 2026
Merged

odykyi merged 3 commits into
flisk-sh:mainfrom
arpanjot-coding:issuepilot/fix-11

Conversation

@arpanjot-coding

@arpanjot-coding arpanjot-coding commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #11.

Reject missing and non-directory scan roots with exit code 2 and a diagnostic naming the path. Warn on stderr when a valid scan matches no files, while still writing an empty SARIF report and exiting successfully. Document both outcomes in the README.

Regression tests cover an invalid scan root and an empty scan. All 18 tests passed in network-disabled Docker containers on Python 3.9 and 3.12.

Reject missing or non-directory scan roots with exit status 2 and a diagnostic that names the supplied path. Warn on stderr when a valid scan matches zero files, while still writing SARIF and exiting successfully.
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 636c8ea3-9f6c-4d96-9c67-d531318e3757
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@arpanjot-coding arpanjot-coding changed the title fix: fix(cli): a --root that does not exist exits 0 with 'Scanned 0 file(s)', so a wrong path in CI passes silently fix(cli): validate scan roots and warn on empty scans Nov 16, 2026
Signed-off-by: odykyi <24225497+odykyi@users.noreply.github.com>
@odykyi
odykyi merged commit 6e3d490 into flisk-sh:main Nov 16, 2026
5 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.

fix(cli): a --root that does not exist exits 0 with 'Scanned 0 file(s)', so a wrong path in CI passes silently

2 participants