Credence.Pattern.NonGroupedClauses
(credence v0.6.0)
Copy Markdown
Fixes function clauses that are not grouped together.
When the same function (name + arity) is defined in multiple places in a module with other functions between them, the compiler emits a warning (which fails compilation under warnings-as-errors).
Bad
def foo(1), do: 1
def bar(x), do: x
def foo(x), do: x + 1 # not grouped with first foo/1!Good
def foo(1), do: 1
def foo(x), do: x + 1
def bar(x), do: x