Dogma.Rules.UnlessElse
A rule that disallows the use of an else block with the unless macro.
For example, the rule considers these valid:
unless something do
:ok
end
if something do
:one
else
:two
end
But it considers this one invalid as it is an unless with an else:
unless something do
:one
else
:two
end
The solution is to swap the order of the blocks, and change the unless to
an if, so the previous invalid example would become this:
if something do
:two
else
:one
end
Summary
| test(script, list2 \\ []) | Callback implementation for |
Functions
Callback implementation for Dogma.Rule.test/2.