View Source hank_rule behaviour (rebar3_hank v1.4.1)
Link to this section Summary
Functions
Analyze the given files with the rule.
The list of default rules to apply
Check if given rule should be ignored from results
Link to this section Types
-type asts() :: [{file:filename(), erl_syntax:forms()}].
-type ignore_pattern() :: undefined | tuple().
-type ignore_spec() :: {file:filename(), t() | all} | {file:filename(), t(), term()}.
-type result() :: #{file := file:filename(), line := non_neg_integer(), text := iodata(), rule => t(), pattern => ignore_pattern()}.
-type t() :: module().
Link to this section Callbacks
-callback analyze(asts(), hank_context:t()) -> [result()].
-callback ignored(ignore_pattern(), term()) -> boolean().
Link to this section Functions
-spec analyze(t(), asts(), hank_context:t()) -> [result()].
-spec default_rules() -> [].
-spec is_ignored(t(), ignore_pattern(), all | term()) -> boolean().