You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A rule to detect unused callbacks.
This rule will check all callbacks defined in a module and find those not used anywhere in the module itself.
It will emit a warning if it can't find the callback's atom name used anywhere within a module. It will NOT emit a warning if an atom named as a callback is being used, no matter for what that atom is used. This limitation is because Erlang has many ways to call a function (particularly when dynamic calls are involved).
The assumption is that if you define a callback for a behavior, your generic module (where the callback is defined) should call that function at some point, using the implementation provided by the specific module (the one that implements the behavior).
Rule
A rule to detect unused callbacks.
This rule will check all callbacks defined in a module and find those not used anywhere in the module itself.
It will emit a warning if it can't find the callback's atom name used anywhere within a module. It will NOT emit a warning if an atom named as a callback is being used, no matter for what that atom is used. This limitation is because Erlang has many ways to call a function (particularly when dynamic calls are involved).
The assumption is that if you define a callback for a behavior, your generic module (where the callback is defined) should call that function at some point, using the implementation provided by the specific module (the one that implements the behavior).
Example
Meandro should emit a warning about the second callback.
The text was updated successfully, but these errors were encountered: