The CollectionInstrument No. 02
graveyard
Every codebase has a graveyard. This hands you the map.
Dead-code analysis
Language Rust
Year 2026
Documentation (opens in a new tab)GitHub (opens in a new tab)The Problem
Dead code never announces itself. Functions stop being called, exports stop being imported, and the corpse quietly rots into everything around it — refactors slow down, searches lie, new contributors fear deleting anything.
The existing finders each guard one ecosystem: vulture for Python, knip for JavaScript, and for Go and Rust mostly compiler warnings that stop at the package boundary. A polyglot repository gets a tool per language, a config per tool, and a set of false positives per config.
The Insight
Dead code is a graph problem. Build one reference graph across every language — then let git history grade the confidence.
The Instrument
graveyard parses Python, JS/TS, Go, and Rust with tree-sitter into a unified reference graph, then scores every candidate with git-aware confidence: 0.35 × age + 0.30 × references + 0.20 × scope + 0.15 × churn.
A baseline diff turns it into a CI ratchet: new dead code fails the build, and the backlog can only shrink. Output speaks table, JSON, CSV, or SARIF, so it fits wherever your team already reads.
One scan, then the ratchet
$ graveyard scan --min-age 30d
CONFIDENCE TAG AGE LOCATION FQN
0.91 dead 1.2 years pay.py:88 pay.py::render_pdf
0.84 exported_unused 7 months web/api.ts:41 web/api.ts::fetchLegacy
0.72 in_dead_cycle 3 months tools/split.go:17 tools/split.go::chunk
Found 3 dead symbol(s) — min-confidence 0.5, min-age 30 days
$ graveyard baseline diff --baseline .graveyard-baseline.json --ci
CONFIDENCE TAG AGE LOCATION FQN
0.72 in_dead_cycle 3 months tools/split.go:17 tools/split.go::chunk
Found 1 dead symbol(s) — min-confidence 0.5, min-age none
$ echo $?
1
Representative output in graveyard’s table format — confidence blends age, reference count, scope, and churn from git history.
Spec
- Languages
- Python · JS/TS · Go · Rust via tree-sitter
- Confidence
- 0.35 age + 0.30 refs + 0.20 scope + 0.15 churn
- CI
- Baseline diff — new dead code fails the build
- Output
- Table · JSON · CSV · SARIF
- Config
- .graveyard.toml, manifest-aware detection
- Install
- crates.io · PyPI · npm · Homebrew
- Adoption
- 364 npm + 75 crates.io downloads, Apr–Oct 2026
- Quick start
pipx install graveyard
The Outcome
graveyard 0.1.2 shipped on 4 April 2026 to crates.io, PyPI, npm and Homebrew, and its release run passed install smoke tests before closing. One scan replaces a patchwork of per-language dead-code checks — and what it prints is a confidence, not a verdict.