Dead Code Detection
Mapnostics scans every file and flags exports, functions, classes, and entire files that are never referenced anywhere. Each flag includes a confidence score so you know exactly what is safe to delete.
What is dead code
Dead code is any code that exists in your repository but is never executed at runtime. It accumulates over years of feature flags, refactors, and abandoned experiments. Left untouched, it misleads engineers, inflates bundle sizes, and introduces hidden risk.
Live demo
Watch Mapnostics scan a repository and surface dead code flags in real time. The scan bar shows progress — each flag appears as it is confirmed with a confidence score.
Reading the results
Confidence score
Confidence is calculated by checking whether the export or function is referenced anywhere — direct imports, dynamic requires, re-exports, and barrel files. A 100% score means zero references were found across the entire codebase.
Flag types
export— a named or default export that no other file imports.function— a declared function that is never called.class— a class definition that is never instantiated or extended.file— the entire file has zero inbound imports anywhere in the repo.
What to do next
- Run the Impact Simulator on a flagged file to confirm it has zero dependents before deleting.
- Mark items as "confirmed dead" and track cleanup progress over time.
- Start with 100% confidence flags — safe to delete immediately.
- Share the report link with a tech lead for async review.