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
#src/x.erl [FAIL]
- export_used_types (https://github.com/inaka/elvis_core/tree/main/doc_rules/elvis_style/export_used_types.md)
- Type state/0, defined on line 7, is used by an exported function but not exported itself
Expected Behavior
No warnings.
Proposed Solution
We already faced a similar issue in rebar3_hank. Until erlang/otp#4847 is dealt with and we get the ability to specify dynamic callbacks, Elvis should avoid emitting this type of warning for types used in exported functions of modules implementing a behavior.
It may be slightly smarter and (just like hank) use the fact that some behaviors (like gen_server) are well-known and they don't have dynamic callbacks.
The text was updated successfully, but these errors were encountered:
Bug Description
In the module I'm showing below, Elvis will ask me to export the
state/0
type. That's not a good idea.To Reproduce
Run Elvis on this module:
You'll get…
Expected Behavior
No warnings.
Proposed Solution
We already faced a similar issue in
rebar3_hank
. Until erlang/otp#4847 is dealt with and we get the ability to specify dynamic callbacks, Elvis should avoid emitting this type of warning for types used in exported functions of modules implementing a behavior.It may be slightly smarter and (just like hank) use the fact that some behaviors (like
gen_server
) are well-known and they don't have dynamic callbacks.The text was updated successfully, but these errors were encountered: