fix: smoke test treats function definitions as calls in BusyBox awk (#773)

Add "(" to the get_candidates skip list so that function definition
lines (e.g. memory_guard() {) are not extracted as call candidates.
Previously this was masked by get_fns also being broken on BusyBox
awk, but fixing get_fns exposed the get_candidates gap.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-26 20:28:18 +00:00
parent c3719618a4
commit f830f3672a

View file

@ -67,9 +67,10 @@ get_candidates() {
if (match(p, /^[a-z][a-zA-Z0-9_]*_[a-zA-Z0-9_]+/)) { if (match(p, /^[a-z][a-zA-Z0-9_]*_[a-zA-Z0-9_]+/)) {
word = substr(p, RSTART, RLENGTH) word = substr(p, RSTART, RLENGTH)
rest = substr(p, RSTART + RLENGTH, 1) rest = substr(p, RSTART + RLENGTH, 1)
# Skip: case labels (word) or word|), Python/jq patterns (word:), # Skip: function definitions (word(), case labels (word) or word|),
# object method calls (word.method), assignments (word=) # Python/jq patterns (word:), object method calls (word.method),
if (rest == ")" || rest == "|" || rest == ":" || rest == "." || rest == "=") continue # assignments (word=)
if (rest == "(" || rest == ")" || rest == "|" || rest == ":" || rest == "." || rest == "=") continue
print word print word
} }
} }