Tier 1 · AST
Python. Full syntax tree: exports, private defs, decorators, base classes, string literals, __all__, __main__ guards, dynamic imports, attribute access on imported modules.
Every language declares how its reference graph is built, and confidence is capped accordingly. A finding in Java can never look as certain as one in Python, because it is not. Run deadpath languages for the live table.
Python. Full syntax tree: exports, private defs, decorators, base classes, string literals, __all__, __main__ guards, dynamic imports, attribute access on imported modules.
TypeScript and JavaScript, including .vue and .svelte. Import specifiers resolve via relative paths, tsconfig paths aliases, and baseUrl. Named exports, @decorators, and package.json dependencies are scored the same way as Python.
Fourteen languages. Each declares how a file is identified (import path, module name, declared types) and what it references. Precision is path or name. All four finding kinds run: orphan files, unused exports, unused manifest dependencies, and private unreachable names.
| Language | Tier | Precision | Detects | Frameworks recognised | Validation commands in workflow |
|---|---|---|---|---|---|
| Python | AST | path | orphan_file · unused_export · unused_dep · unreachable | Django, Flask, FastAPI/Starlette, pytest, Celery, SQLAlchemy/Alembic, Click/Typer, Airflow, Pydantic | python -c "import …" · mypy / pyright · pytest |
| TypeScript / JavaScript | import graph | path | orphan_file · unused_export · unused_dep · unreachable | Next.js, React, Vue, Nuxt, Angular, Svelte/SvelteKit, Remix/React Router, Astro, Vite, Express/Koa/Fastify/Hono, NestJS, Electron, Jest/Vitest, Playwright/Cypress | npx tsc --noEmit · vitest / jest / npm test |
| Go | reference graph | path | orphan_file · unused_export · unused_dep · unreachable | Gin, Echo, Fiber, Gorilla, Chi, Cobra, urfave/cli | go build ./... · go vet ./... · go test ./... |
| Rust | reference graph | path | orphan_file · unused_export · unused_dep · unreachable | Actix, Axum, Rocket, Warp, Tokio, Clap | cargo check --all-targets · cargo test |
| Java | reference graph | name | orphan_file · unused_export · unused_dep · unreachable | Spring, Quarkus, Micronaut, JUnit/TestNG | mvn compile/test · ./gradlew test |
| Kotlin | reference graph | name | orphan_file · unused_export · unused_dep · unreachable | Ktor, Android, Spring, Quarkus, Micronaut, JUnit | ./gradlew build · ./gradlew test |
| Scala | reference graph | name | orphan_file · unused_export · unused_dep · unreachable | Spring, Quarkus, Micronaut, JUnit (sbt projects) | sbt compile · sbt test |
| C# | reference graph | name | orphan_file · unused_export · unused_dep · unreachable | ASP.NET Core, xUnit/NUnit/MSTest | dotnet build · dotnet test |
| Ruby | reference graph | path | orphan_file · unused_export · unused_dep · unreachable | Rails, Sinatra, RSpec/Minitest | rubocop · rspec / rake test |
| PHP | reference graph | name | orphan_file · unused_export · unused_dep · unreachable | Laravel, Symfony | composer validate · phpunit |
| Swift | reference graph | name | orphan_file · unused_export · unused_dep · unreachable | SwiftUI/UIKit, Vapor | swift build · swift test |
| Dart | reference graph | path | orphan_file · unused_export · unused_dep · unreachable | Flutter | dart analyze · flutter test / dart test |
| Elixir | reference graph | name | orphan_file · unused_export · unused_dep · unreachable | Phoenix | mix compile --warnings-as-errors · mix test |
| C / C++ | reference graph | path | orphan_file · unused_export · unused_dep · unreachable | CMake / Make / Meson / vcpkg projects | cmake --build build · ctest |
| Lua | reference graph | path | orphan_file · unused_export · unused_dep · unreachable | rockspec, Neovim plugin layouts | luacheck · busted |
| Perl | reference graph | path | orphan_file · unused_export · unused_dep · unreachable | cpanfile / Makefile.PL | perl -c · prove -l t |
Go import paths via go.mod, Rust mod/use crate::, Dart package: URIs, Ruby require_relative, C #include "…", Lua require, Perl use. A missing edge is strong evidence. Signal <lang>_path_resolved_graph −0.03; orphan files can reach block (0.89).
Java/Kotlin/Scala imports plus same-package type names, C# and Swift declared types, PHP namespaces, Elixir modules. Reflection, DI containers and code generation can hide edges. Signal <lang>_name_reference_graph −0.30; orphan files top out at warn (0.62) and always get a verify step.
Frameworks are detected two ways and unioned: import statements in source files, and dependency names in manifests — package.json, pyproject.toml, requirements.txt, go.mod, Cargo.toml, pom.xml, build.gradle(.kts), *.csproj, Gemfile, composer.json, Package.swift, pubspec.yaml, mix.exs, build.sbt. Each framework contributes:
urls.py, Next.js app/, Rails app/, Spring controller/, Laravel routes/…). These are never reported as orphans.@app.get, @receiver, @Component, @Composable, @HttpGet…) that lower export confidence by 0.60.models.Model, ApplicationRecord, ControllerBase, StatelessWidget…) that lower it by 0.35.Workspaces from package.json, pnpm-workspace.yaml, Nx/Turbo/Lerna, Cargo [workspace], go.work, and nested manifests set profile.monorepo. The graph is built per repository root; scan a package directory for a package-local view.
Adding a language is a ~40-line entry in deadpath/polyglot.py: suffixes, an ids() function, a refs() function, an entry rule, a test rule, and validation commands. Precision must be declared.