Currently, due to ktn_dodger limitations, some macro definitions are parsed as text.
For instance, the one below…
-define(UNUSED_MACRO_WITH_BROKEN(CODE), case ?CODE of code -> ??CODE) .
ktn_dodger does its best to parse all macro definitions but when you just drop some random piece of code there, it might be impossible to parse it.
In those scenarios, Hank sees the following syntax tree:
#tree{type = text,
attr = #attr{pos = 10,ann = [],com = none},
data = "-define( UNUSED_MACRO_WITH_BROKEN( CODE ) , case ?CODE of code -> ??CODE ) .\n"}
Basically a random block of text. It can't tell if that's a macro definition or not, let alone figure out the macro name and arity. So it doesn't tell you if that macro is actually unused.
Currently, due to
ktn_dodger
limitations, some macro definitions are parsed astext
. For instance, the one below…ktn_dodger
does its best to parse all macro definitions but when you just drop some random piece of code there, it might be impossible to parse it. In those scenarios, Hank sees the following syntax tree:Basically a random block of text. It can't tell if that's a macro definition or not, let alone figure out the macro name and arity. So it doesn't tell you if that macro is actually unused.