AdRoll / rebar3_hank

The Erlang Dead Code Cleaner
MIT License
68 stars 9 forks source link

Warn on dead `ignore_xref` #221

Open kivra-pauoli opened 8 months ago

kivra-pauoli commented 8 months ago

Is your feature request related to a problem? Please describe.

rebar3 uses ignore_xref directive to silence xref analysis when an exported function is not used in the scope of the analysis. It might so happen that after a while you start using the "ignored" function, but the directive remains in the code, which would potentially classify as "dead code".

Describe the solution you'd like

Should hank care about this, this being rebar3 but also the "standard" Erlang build tool (which would make ignore_xref part of the scope hank "knows/cares" about)?

Describe alternatives you've considered

Keep having unnecessary ignore_xref directives here and there and reviewing that code, if/when I remember.

Additional Context

None.