Dogma v0.1.16 Dogma.Rule.InfixOperatorPadding

A rule that ensures that all infix operators, except the range operator .., are surrounded by spaces.

This rule is only enabled for Elixir v1.1 or greater.

Good:

foo = bar

foo - bar

foo || bar

foo |> bar

foo..bar

Bad:

foo=bar

foo-bar

foo||bar

foo|>bar

By default, no space is required between the fn and -> of an anonymous function. A space can be required by setting the fn_arrow_padding option to true.

Summary

Functions

Callback implementation for c:Dogma.Rule.test/2

Functions

test(rule, script)

Callback implementation for c:Dogma.Rule.test/2.