Skip to content

review_checks: report semgrep as not checked when it scans zero files - #2289

Merged
remigiusz-antczak merged 3 commits into
mainfrom
land/semgrep-zero-files
Nov 11, 2026
Merged

remigiusz-antczak merged 3 commits into
mainfrom
land/semgrep-zero-files

Conversation

@remigiusz-antczak

@remigiusz-antczak remigiusz-antczak commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #2283.

review_checks.sh treated a semgrep chunk that scanned 0 files as clean. It now reports semgrep as NOT CHECKED: one line and one not-checked row when every chunk scanned 0 files, and no false not-checked row when only some chunks did. A chunk whose files all errored stays reported as errored, even when semgrep lists no scanned files.

Tests: 6/6 (scripts/test-review-checks-semgrep-zero-files.sh, wired into the CI test set).

🤖 Generated with Claude Code

remigiusz-antczak and others added 3 commits November 11, 2026 10:10
When semgrep reports an empty paths.scanned list and no findings, the hub
now records a not-checked row and prints "NOT CHECKED: semgrep scanned 0
files" instead of treating the chunk as clean. Adds a regression test.

Tests: 4/4

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B4dfwe8bGsWUqekBt1dkaf
A semgrep chunk with errors, empty paths.scanned and no results was forced to rc=5 (zero files), losing the errored not-checked row. Guard that branch with not err.

Tests: 3/3 semgrep scripts pass

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@remigiusz-antczak
remigiusz-antczak merged commit b248e82 into main Nov 11, 2026
11 checks passed
@remigiusz-antczak
remigiusz-antczak deleted the land/semgrep-zero-files branch November 11, 2026 13:42
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.

Semgrep: zero files scanned reports NOT CHECKED

1 participant