Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

docs(dead-code): correct dynamic-import language coverage in DEAD_CODE.md and dynamic_markers.py (#2354) (#2629)

Rishabh Mishraf7b7abd786ab
diff --git a/docs/layers/DEAD_CODE.md b/docs/layers/DEAD_CODE.md
index 47bc4547f..bd632214c 100644
--- a/docs/layers/DEAD_CODE.md
+++ b/docs/layers/DEAD_CODE.md
@@ -245,9 +245,11 @@ These are the cases where a finding is most likely wrong:
config file, a handler looked up in a registry dict, a Java class loaded by
`Class.forName`. The dynamic-pattern name list and the `.register` decorator
suffix catch the common shapes; nothing catches all of them.
-- **Dynamic imports in unmodelled languages.** The marker table covers Python and
- JS/TS. Go, Ruby, PHP, Kotlin, Swift, and Scala runtime loading is not detected
- yet, so an orphan in those languages carries no dynamic-import cap.
+- **Dynamic imports in unmodelled languages.** The marker table covers Python,
+ JS/TS, Java, Kotlin, Ruby, PHP, Go, Swift, Scala, Rust, C#, and C/C++.
+ Languages without dynamic import markers or framework hints do not detect
+ runtime loading, so an orphan in those unmodelled languages carries no
+ dynamic-import cap.
- **Entry points the graph did not mark.** A binary target, a CLI script, or a
serverless handler that neither the allowlist nor the entry-point pass
recognized reads as unreachable every time. If you see a whole directory light
diff --git a/packages/core/src/repowise/core/analysis/dead_code/dynamic_markers.py b/packages/core/src/repowise/core/analysis/dead_code/dynamic_markers.py
index 06f38e79f..9d9895a7f 100644
--- a/packages/core/src/repowise/core/analysis/dead_code/dynamic_markers.py
+++ b/packages/core/src/repowise/core/analysis/dead_code/dynamic_markers.py
@@ -5,14 +5,13 @@ When a repo uses ``importlib.import_module``, ``import()``,
be loaded at runtime. The dead-code analyzer scans for these markers to
lower confidence on findings within their packages.
-Phase 2 work (A1/A2 in ``docs/LANGUAGE_REMAINING_WORK.md``) will:
-
-- expand the marker dicts to cover Go, Ruby, PHP, Kotlin, Swift, Scala,
-- and / or replace this text-scan with consumption of ``edge_type="dynamic"``
- edges produced by the ``dynamic_hints`` extractors.
+The marker dictionary covers Python, JavaScript/TypeScript, Java, Kotlin,
+Ruby, PHP, Go, Swift, Scala, Rust, C#, and C/C++. In addition, language-specific
+dynamic imports are recognized via ``edge_type="dynamic"`` edges produced by
+the ``dynamic_hints`` extractors.
Keep new entries grouped by file extension so the per-language audit
-in Phase 2 stays mechanical.
+stays mechanical.
"""
from __future__ import annotations