[Bug] JS/TS identifiers with $ or under three characters are never matched by the dead-code name scan, so a read binding is reported as not used anywhere
Maintainers usually reply within 1 day
@Papito084 is already working on this.
Since Nov 26, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript, python, typescript
- Domain
- developer-experience, testing-qa
Research direction
Start with packages/core/src/repowise/core/analysis/dead_code/name_occurrences.py:80 and trace searchable_token at line 297. Check the other callers in analyzer.py, c_name_uses.py, and go_name_uses.py to preserve their current identifier shape. Add regression coverage under tests/unit/analysis/dead_code/ using the repro; done means neither read binding is reported, with the non-ASCII rule unchanged. Two open pull requests are already linked.
Written by the indexing model from the issue text.
Description
Summary
The dead-code name scan only recognises identifiers of three or more characters made of [A-Za-z0-9_]. A JS/TS binding such as currentUser$ or ws is never matched, so the scan cannot see a read of it and the finding says "not used anywhere" although it is used.
packages/core/src/repowise/core/analysis/dead_code/name_occurrences.py:80
IDENTIFIER_RE = re.compile(rb"[A-Za-z_][A-Za-z0-9_]{2,}")
Mechanism
searchable_token(:297) returns empty for a nameIDENTIFIER_REcannot match, so the verdict is "not searchable" and the finding is only capped at 0.3 (UNVERIFIED_INTERNAL_CONFIDENCE), not cleared.- Such names rely on graph edges alone. A read the graph has no edge for stays flagged.
Repro
src/a.ts: const currentUser$ = makeStore(); const ws = makeStore(); function makeStore() { return {}; } export function run(cb) { cb(currentUser$); cb(ws); }, plus src/b.ts importing run. Then:
repowise dead-code --include-internals --kind unused_internal --min-confidence 0 --format json
"symbol_name": "currentUser$", "confidence": 0.3, "reason": "Private symbol 'currentUser$' is not used anywhere"
"symbol_name": "ws", "confidence": 0.3, "reason": "Private symbol 'ws' is not used anywhere"
Impact
Both are read in their own file. The 0.3 cap hides them by default, but the reason text is false and they surface at a lower threshold.
Done looks like
- Admit
$in the identifier shape for JS/TS, and lower the minimum length for those languages, without changingsearchable_token's non-ASCII rule. - Check the other callers of
IDENTIFIER_RE(analyzer.py,c_name_uses.py,go_name_uses.py) keep their current shape.
Tests
tests/unit/analysis/dead_code/: the repro above reports neither binding.
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 756
- Avg merge
- 21h 5m
- Merged PRs (30d)
- 797
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from repowise-dev/repowise
-
[Bug] Elixir `.formatter.exs`, `.credo.exs`, `config/*.exs` and `priv/**/*.exs` are reported as unreachable filesPossibly taken @ZYZ666-RGB claimed this 1 day ago. Openbug good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#6296 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug] Coverage stack detection omits Swift, Dart, and Scala, falling through to UNKNOWN in evidence setupPossibly taken @RishabhIIITD claimed this 2 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
repowise-dev/repowise#5838 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] PR-mined decisions store the decision sentence again as their rationalePossibly taken @suyashgitt claimed this 11 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#5702 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] CICS CSD `DEFINE _PGMLIST` startup programs (`_PGMPH`) are not rootsPossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
repowise-dev/repowise#4477 ·
Maintainers usually reply within 1 day
-
[Bug] COBOL listing directives EJECT, SKIP1/SKIP2/SKIP3 and TITLE fail to parse and drop the rest of the filePossibly taken @dchaudhari7177 claimed this 34 days ago. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
repowise-dev/repowise#4474 ·
Maintainers usually reply within 1 day
All issues in repowise-dev/repowise
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
kornia/kornia-rs#1416 · 1 comment ·
Maintainers usually reply within 2 days
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/ai-inequality#64 ·
Maintainers usually reply within 1 day
-
LinearGaussianStateSpace.dist splits states and observations wrongly when the transition varies over timePossibly taken @PabloRoque claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pymc-devs/pymc-extras#839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day