For consistency, inside a given project, we should either define childspecs inside workers, or inside supervisors. That doesn't mean there aren't exceptions to the rule, but that's why rules are configurable :)
This should support option ignore.
Of course, a supervisor might supervise other supervisors, so we need to take care of that case. In any case, the goal should be to "have the childspec defined in the module that uses it" v. "have the childspec defined outside the module that uses it".
I'm not sure about the default in (see below): supervisor v. worker.
I propose [{elvis_style, childspecs, #{ in => supervisor, ignore => [] }.
For consistency, inside a given project, we should either define childspecs inside workers, or inside supervisors. That doesn't mean there aren't exceptions to the rule, but that's why rules are configurable :)
This should support option
ignore
.Of course, a supervisor might supervise other supervisors, so we need to take care of that case. In any case, the goal should be to "have the childspec defined in the module that uses it" v. "have the childspec defined outside the module that uses it".
I'm not sure about the default
in
(see below):supervisor
v.worker
.I propose
[{elvis_style, childspecs, #{ in => supervisor, ignore => [] }
.