Detecting Oxbow Code in Erlang Codebases with the Highest Degree of Certainty
summary
A rebar3 plugin called hank statically scans Erlang ASTs to detect specific unused macros, unused record fields and unused header files, plus unused config keys (heuristic: atom occurrence), function arguments, callbacks and NIFs. Each rule is configurable and designed to avoid false positives — if hank flags something it is safe to remove. Running it on OTP (~2M LOC), Kazoo and a carefully maintained project surfaces many surprising removals and validates the approach.
AI-written summary · about
chapters (5)
- 0:00Start
- 0:53A Simple Ticket...
- 3:43A seemingly simple change...
- 8:47Why don't we delete everything?
- 12:15Hank Rules
related talks
33mHank & Meandro: The Oxbow Code Detectors for Erlang and Elixir
49mXref.rs - Erlang static analysis in Rust
27mBuilding Erlang with Buck2
52mRefactorErl supports your Daily Work!
27mBuilding Erlang with Buck2
34mThe Future of Erlang LS
34mInfERL: Scalable and Extensible Erlang Static Analysis
58mHow I learned to stop worrying and love macros
