Repository navigation
Report Semgrep file-level parse errors as a partial scan - #475
Merged
Merged
Conversation
chrisknvidia
requested review from
mosheabr,
rmalani-nv and
rng1995
as code owners
November 13, 2026 00:35
Semgrep file-level parse errors now produce one partial-scan error that names up to 20 unparsed files, relative to the skill and with the line of the first error, instead of the first three truncated errors. The check stays incomplete because Semgrep skips the code it cannot parse; findings for other files are kept and other Semgrep errors are reported as before. - Count files rather than path:line entries, and say the file is not fully parsed: Semgrep reports most syntax errors as PartialParsing and still scans the rest of the file. - Treat OtherParseError and AstBuilderError as file-level parse errors. - Write the unparsed files to the JSON report as semgrep_unparsed_files (up to 1,000, with semgrep_unparsed_files_omitted counting the rest) and restore them from retained reports. - Keep each skill's list when a folder scan merges per-skill results. Closes #463 Signed-off-by: Christopher Kevin <[email protected]>
chrisknvidia
force-pushed
the
fix/semgrep-parse-errors
branch
from
November 13, 2026 08:14
3e55a77 to
9f068de
Compare
Signed-off-by: Christopher Kevin <[email protected]>
A report restored from JSON kept the first 1,000 unparsed Semgrep files but lost semgrep_unparsed_files_omitted, so a combined report made the cut list look complete. Validate and restore the count in retained reports, add a restored count to any new overflow when rendering JSON, and add the counts up when a folder scan merges per-skill results. Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
8 of 9 tasks
Contributor
rng1995
reviewed
Nov 13, 2026
rng1995
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed 821d5ed65f73, including Semgrep parse-error grouping, findings retention, merged scan metadata, report caps, and retained-result round trips. The selected validator and incomplete-report suites passed (90 tests). Previous fixes are present; no new actionable finding. Validation used captured responses/mocks rather than a live Semgrep invocation.
Closed
2 tasks done
rng1995
added a commit
that referenced
this pull request
Nov 13, 2026
Resolve the CHANGELOG conflict by keeping this branch's moves and adding main's new entries where main has them: #500 under Unreleased, and #369 and #475 under 0.9.0 (moved to Unreleased in the next commit). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
added a commit
that referenced
this pull request
Nov 13, 2026
#369 and #475 merged after v0.9.0 was cut, but their entries landed in the 0.9.0 section. Move them to Unreleased (Changed and Fixed) so 0.9.0 matches the released notes again. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
added a commit
that referenced
this pull request
Nov 13, 2026
Resolve the CHANGELOG conflict with #503 by putting its entry at the top of Unreleased > Fixed, above the moved #475 entry it merged after. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
added a commit
that referenced
this pull request
Nov 13, 2026
* docs(changelog): move post-0.9.0 entries to Unreleased #497 and #459 merged after v0.9.0 was cut, but their entries landed in the 0.9.0 section that the release prep had just created. Move them, unchanged, to Unreleased. The 0.9.0 section now matches the released v0.9.0 notes exactly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * docs(changelog): move #369 and #475 entries out of 0.9.0 #369 and #475 merged after v0.9.0 was cut, but their entries landed in the 0.9.0 section. Move them to Unreleased (Changed and Fixed) so 0.9.0 matches the released notes again. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Semgrep file-level parse errors now produce one partial-scan message that names up to 20 unparsed files, relative to the skill and with the line of the first error, instead of the first three truncated errors. Every unparsed file is listed in the
semgrep_unparsed_filesfield of the JSON report. The check staysincompletebecause Semgrep skips the code it cannot parse; findings for other files are kept and other Semgrep errors are reported as before.Closes #463
Verification
ruff checkmake test(fullpython -m pytest -n 4on 38f7480: 23,201 passed. 494 failed and 141 errors are in Tier 3, Harbor and CLI tests; they fail the same way on the unmodified branch because my local environment has Harbor 0.13.2 instead of the pinned 0.25.0, and none are in files this PR touches)make build(python -m build: sdist and wheel built)Release Impact
CHANGELOG.md