repowise-dev / repowise-dev/repowise
[Docs] DEAD_CODE.md under-lists the edge types the unused_export pass treats as a use
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 711
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 439
Description
Summary
The unused_export row of the four-finding-kinds table names six edge types. The pass checks against a nine-member set.
Mechanism
unused_export reasons over REACHABILITY_USE_EDGE_TYPES.
packages/core/src/repowise/core/analysis/dead_code/analyzer.py:24, used at :1383, :1481, :1510 and :1635
That constant is SYMBOL_USE_EDGE_TYPES | {"type_use"}.
packages/core/src/repowise/core/ingestion/models.py:591
and SYMBOL_USE_EDGE_TYPES at :554-568 holds calls, extends, implements, method_implements, dispatches_to, framework_binds, reads, references. Nine in total. The doc names six and omits dispatches_to, framework_binds and references.
Repro
docs/layers/DEAD_CODE.md:46 reads:
...no
calls/method_implements/reads/extends/implements/type_useedge reaches it.
Impact
Anyone using the documented list to predict or explain an unused_export finding will be wrong for a symbol reached only through dispatches_to, framework_binds or references, which is exactly the dispatch-table and framework-bound population those edge types were added to cover.
Done looks like
The unused_export row lists all nine, matching REACHABILITY_USE_EDGE_TYPES.
Only the unused_export row is wrong. The unused_internal row at :47 names only calls, and that is correct by design for that finding kind. Please do not change it.
Tests: no test of its own. Worth asking in the pull request whether the drift check can pin this row against the literal contents of REACHABILITY_USE_EDGE_TYPES.
Contributor 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.
Research direction
Open docs/layers/DEAD_CODE.md at the unused_export row, then compare it with REACHABILITY_USE_EDGE_TYPES in packages/core/src/repowise/core/analysis/dead_code/analyzer.py and SYMBOL_USE_EDGE_TYPES in packages/core/src/repowise/core/ingestion/models.py. Update only that row so it lists all nine edge types, leaving unused_internal unchanged; no dedicated test is mentioned.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100