feat(rees): add error-swallow analyzer for empty catch blocks (#2014) - #3525
feat(rees): add error-swallow analyzer for empty catch blocks (#2014)#3525RealDiligent wants to merge 2 commits into
Conversation
…red#2014) Detect JS/TS empty catches, unused bindings, and return-null swallow patterns in added patch lines. Part of JSONbored#1499. Co-authored-by: Cursor <cursoragent@cursor.com>
…SONbored#2014) Collect added JS catch bodies across following diff lines, advance newLine for context rows, use only the immediate next Python except body line, and skip optional-catch blocks that run non-empty code without swallowing. 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 15:40:05 UTC
🛑 Suggested Action - Reject/Close
Review summary Blockers
Nits — 5 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 (AI reviewers agree on a likely critical defect: review-enrichment/src/analyzers/error-swallow.ts:42 uses `\b${binding}\\b` semantics for all catch bindings, but `$` is a valid JS identifier character and not a regex word character, so `catch ($err) { handle( |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3525 +/- ##
=======================================
Coverage 93.09% 93.09%
=======================================
Files 301 301
Lines 31450 31450
Branches 11483 11483
=======================================
Hits 29279 29279
Misses 1517 1517
Partials 654 654
🚀 New features to boost your workflow:
|
Summary
errorSwallowlocal analyzer for empty/unused catch blocks and return-null swallow patterns in JS/TS and Python patches.Closes #2014
Part of #1499
Supersedes #3516 (auto-closed for line-local scanning defects).
Test plan
review-enrichment:npm run build && npm run metadata:checknode --test test/error-swallow.test.ts test/analyzer-registry.test.ts(14/14 pass)npm run typecheck