This won't work, @bormilan … `Init1Fun` being `[]` will only cause errors down the line. I'll make a code suggestion that's more likely to work in this case…
Drop a note like this one when you do it…
```erlang
case elvis_code:find(IsInit1Function, Root) of
[] ->
%% A module that implements the behaviour without defining init/1 is valid
...
Well… it seems like there is no way to bypass the behaviour check in the Erlang compiler, so… Do not add such a test, but do fix the code to account for `elvis_code:find(…)` returning `[]` here.
So the compiler compiles all the modules that we use for testing? I was not aware of that. In any case, you can add a `-compile(…).` attribute to the module to avoid warnings. I'll see if I can fin...
If you add a simple test for each one of them… like the module below… much better. If not, no big deal.
```erlang
-module(fail_{BEHAVIOUR}).
-behaviour({BEHAVIOUR}).
-export([init/1]).
...
```suggestion
#{behaviours => [gen_server, gen_statem, gen_fsm, supervisor, supervisor_bridge, gen_event]};
```
Let's add the other ones that I found while grepping for `-callback init` in...
Exactly! All OTP behaviours expect a single argument in `init(…)`. That's what kickstarted this whole thing. `gen_server` docs use a list as _InitArgs_… while in reality it's just a single _InitArg...