Skip to content

fix(reports): do not report success when every model was skipped - #366

Open
Eljees wants to merge 1 commit into
protectai:mainfrom
Eljees:fix/skipped-summary-218
Open

fix(reports): do not report success when every model was skipped#366
Eljees wants to merge 1 commit into
protectai:mainfrom
Eljees:fix/skipped-summary-218

Conversation

@Eljees

@Eljees Eljees commented Jul 28, 2026

Copy link
Copy Markdown

Fixes #218

When every model in the scan was skipped, the console report still printed the success line:

--- Summary ---

 No issues found! 🎉

--- Skipped ---

Total skipped: 1 - run with --show-skipped to see the full list.

"No issues found" is only true of files that were actually scanned, and the skip notice sits below the
line most people stop reading at.

ConsoleReport now distinguishes the two cases:

 No issues found in the scanned files, but 1 file(s) were skipped and not scanned.

The cheerful line stays exactly as it was when nothing was skipped, so a clean scan looks the same as before.
Exit codes are untouched — this PR only changes what the summary says.

Tests

tests/test_reports.py (new): with a skipped file the output must not contain "No issues found!" and must
mention the skipped count; with nothing skipped the original line must still appear.

PYTHONPATH=/src python -m pytest tests/test_reports.py tests/test_cli.py -q   ->  3 passed

AI-assisted (LLM used for drafting); the change and the test run are mine.

The console summary printed 'No issues found!' even when the scan skipped all files, which reads as a clean result.

Signed-off-by: Eljees <[email protected]>
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.

Misleading output of "No issues found!" when a model is skipped

1 participant