aprs.me/lib
Graham McIntire 5fb653bf05
Implement mix_unused-style unused public function detector
Adds a self-contained 'unused' Mix compiler task that finds public
functions in this project no caller in the project ever invokes:

- MixUnused.Analyzer: enumerates public functions across the project's
  compiled BEAM files (filtered by app), walks the abstract code in
  each BEAM via :beam_lib to collect every remote {Module, fun, arity}
  call observed at compile time, and subtracts the call set from the
  def set. Exposes :exclude (modules or MFA triples), :compile_path,
  and :app options. Behaviour callbacks (@impl true and any listed
  in behaviour_info(:callbacks)) and well-known entry points
  (start_link, child_spec, mount, render, GenServer callbacks,
  __info__, module_info, etc.) are excluded automatically.

- Mix.Tasks.Compile.Unused: a Mix.Task.Compiler that compiles the
  project then asks the analyzer for unused defs. Severity is
  configurable via the :unused project key; per-file exclusion of
  test/ paths is on by default.

Inspired by https://github.com/hauleth/mix_unused — uses BEAM
introspection rather than a compilation tracer to avoid the
chicken-and-egg problem of recompiling the tracer module itself
during analysis.
2026-05-08 12:30:04 -05:00
..
aprsme Add PromEx Prometheus exporter and /metrics endpoint 2026-05-08 10:41:06 -05:00
aprsme_web Add PromEx Prometheus exporter and /metrics endpoint 2026-05-08 10:41:06 -05:00
mix/tasks Implement mix_unused-style unused public function detector 2026-05-08 12:30:04 -05:00
mix_unused Implement mix_unused-style unused public function detector 2026-05-08 12:30:04 -05:00
aprs_web.ex upgrade more with modern phoenix 2025-07-05 08:04:06 -05:00
aprsme.ex refactor to use external parser 2025-06-24 14:22:09 -05:00