function head shrinking shrinks when clauses
Closed this issue · 2 comments
novaugust commented
when there are multiple whens, leave them on their own lines
def foo(a)
when is_float(a)
when is_integer(a) do
...
end
# becomes
def foo(a) when is_float(a) when is_integer(a) do
novaugust commented
hadn't seen it before as it's unusual to have multiple whens but also still collapse to one line :)
novaugust commented
honestly, looking at this, i feel like it'd be more normal to just write when is_float(a) or is_integer(a)
for something so simple, so maybe getting shrunk up to one line is a good code-smell warning (like how we add moduledoc false
everywhere). so... gonna call this one a WONTFIX
sorry @keathley, laziness wins out ❤️