Skip to content

fix(javascript): bound the bare call-site identifier alternative's param-list class to reject nested calls - #1462

Merged
squid-protocol merged 2 commits into
mainfrom
fix/javascript-1452-bare-identifier-fallback
Aug 13, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
fix/javascript-1452-bare-identifier-fallback

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #1452. A one-character regex fix: the bare-call-site-identifier func_start alternative used [^)]* for its trailing lookahead, which could greedily step into a nested inline callback's own parens (e.g. swap( elem, cssShow, function() {) and match with zero capturing groups, triggering detector.py's fallback-to-whole-match-text naming and reporting the call target (not a definition) as a phantom function. Restricted to [^)(]* so it can't step into a nested paren. extra_functions 193->187, found_functions unchanged. Full checklist run: tests pass, --all --ci clean across 31 languages, golden masters blessed, audit_check clean.

🤖 Generated with Claude Code + Gemini (Antigravity CLI)

@squid-protocol
squid-protocol enabled auto-merge (squash) August 13, 2026 16:29
squid-protocol and others added 2 commits August 13, 2026 13:37
…ram-list class to reject nested calls (#1452)

The bare-call-site-identifier func_start alternative used [^)]* for its
trailing lookahead's parameter-list portion, which could greedily consume
through a nested inline callback's own opening paren and stop at the
callback's closing paren instead -- e.g. `swap( elem, cssShow, function() {`
satisfied the lookahead with the callback's own `)` and `{`, while the
actual matched text was just the bare identifier `swap` with zero
capturing groups, triggering detector.py's match.lastindex-fallback
naming and reporting the CALL target (an imported function, not a
definition) as a phantom function.

Fixed by restricting the character class to [^)(]* so it can no longer
step into a nested paren.

extra_functions 193->187, found_functions unchanged at 535.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Co-Authored-By: Gemini 3.1 Pro <[email protected]>
@squid-protocol
squid-protocol force-pushed the fix/javascript-1452-bare-identifier-fallback branch from 2c6d647 to 960d444 Compare August 13, 2026 17:47
@squid-protocol
squid-protocol merged commit e1f27d8 into main Aug 13, 2026
27 checks passed
@squid-protocol
squid-protocol deleted the fix/javascript-1452-bare-identifier-fallback branch August 13, 2026 17:47
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

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.

javascript func_start: bare call-site identifiers with no capturing group fall back to whole-match-text naming, producing phantom functions

1 participant