Closed elbrujohalcon closed 3 years ago
Ignoring specific rules for specific functions would be a good feature.
That's a simple approach, I was thinking more a "config" one, similar to xref
, it would add a bit more logic but easier to add/remove ignore rules:
-ignore_hank({unused_ignored_function_params, {?MODULE, my_fun, 3}}).
-ignore_hank({single_use_macros, {?MODULE, ?MY_MACRO}}).
More details about its implementation at PR: https://github.com/AdRoll/rebar3_hank/pull/83
I would like to be able to ignore some particular instances of a warning and not the whole module. In particular, I would like to be able to ignore some particular macros for
single_use_macros
or some particular functions (or even arguments) forunused_ignored_function_params
.I'm not sure how this configuration would work, maybe
hank_rule:result()
should include anid
field that we can pattern-match for ignoring (unused_ignored_function_params
ids could be{Module, Function, Position}
while the ones forunused_macros
could be{Module, MacroName}
and so on…).