hank (rebar3_hank v2.0.0)

View Source

The Erlang Dead Code Cleaner

Summary

Functions

Runs a list of rules over a list of files and returns all the dead code pieces it can find.

Types

ms()

-type ms() :: non_neg_integer().

parsing_style()

-type parsing_style() :: parallel | sequential.

stats()

-type stats() :: #{ignored := non_neg_integer(), parsing := ms(), analyzing => ms(), total => ms()}.

Functions

analyze(Files, IgnoreSpecsFromState, Rules, ParsingStyle, Context)

-spec analyze([file:filename()],
              [hank_rule:ignore_spec()],
              [hank_rule:t()],
              parsing_style(),
              hank_context:t()) ->
                 #{results := [hank_rule:result()],
                   unused_ignores := [hank_rule:ignore_spec()],
                   stats := stats()}.

Runs a list of rules over a list of files and returns all the dead code pieces it can find.