Closed NAR closed 3 years ago
I would've expected ktn_code
to return behavior
in both cases, tho… 🤔
If you're certain that it doesn't, and you feel like submitting a PR with the proposed change, that would be highly appreciated.
When I changed the attribute to -behaviour
, I didn't get warning - I presume because the code doesn't detect that the module is an OTP behaviour. WIth -behavior
I got the warning. I'll try to cook up a PR.
I think I've touched this subject somewhere, and @jfacorro got involved. Let me do a quick search...
I think I've touched this subject somewhere, and @jfacorro got involved. Let me do a quick search...
My issue was not related to this, but it also boiled down to spelling 😄: https://github.com/inaka/elvis/issues/522.
Fixed with inaka/elvis_core#139
In Erlang both the US and British spelling is accepted for the
-behaviour
attribute, however, theelvis_style:is_otp_module/1
function only checks for the US spelling and doesn't detect OTP behaviours using the British spelling:Maybe use something like this: