feat(enrichment): empty-catch / error-swallow analyzer - #3479
feat(enrichment): empty-catch / error-swallow analyzer#3479bohdansolovie wants to merge 2 commits into
Conversation
Fixes JSONbored#2014 — flags swallowed errors in added JS/TS/Python catch/except blocks. Co-authored-by: Cursor <cursoragent@cursor.com>
Add hardcodedUrl, errorSwallow, and debugLeftover so env/manifest validation matches the REES registry. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - reject/close recommendedReview updated: 2026-07-05 09:14:31 UTC
🛑 Suggested Action - Reject/Close
Review summary Blockers
Nits — 4 non-blocking
Why this is blocked
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
|
Gittensory is closing this pull request on the maintainer's behalf (Linked issue overlaps another open PR; AI reviewers agree on a likely critical defect: review-enrichment/src/analyzers/error-swallow.ts:9: the JS catch regexes require `catch (...)`, so `catch {}` / `catch { return null; }` blocks introduced by ES2019 are never reported even though they are reachable swallowed-error cases; change the catch patterns to accept optional binding, e.g. `const CATCH_OPEN_RE = /catch(?:\s*\(\s*(\w+)?\s*\))?\s*\{/;` and make the same optional-parens change for `SINGLE_CATCH_RE`, then add tests for `catch {}` and `catch { return null; }`.; duplicate of another open PR). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3479 +/- ##
=======================================
Coverage 93.03% 93.03%
=======================================
Files 299 299
Lines 31204 31204
Branches 11386 11386
=======================================
Hits 29031 29031
Misses 1517 1517
Partials 656 656
🚀 New features to boost your workflow:
|
Summary
Fixes #2014
ErrorSwallowFindingand a localerrorSwallowanalyzer for newly-added catch/except blocks that swallow errors (empty-catch,unused-binding,return-null)review-enrichment/test/error-swallow.test.tssrc/review/enrichment-analyzer-names.tswith the REES registry (addserrorSwallow, plushardcodedUrl/debugLeftoverthat were missing after feat(enrichment): leftover console.log / debugger analyzer #3472/feat(enrichment): hardcoded-URL / raw-endpoint heuristic analyzer #3474)Test plan
cd review-enrichment && npm run build && npm run metadata && node --test test/error-swallow.test.ts test/analyzer-registry.test.tsvalidate-codeMade with Cursor