I have an Elixir project .formatter.exs
file in my umbrella app's root that looks like this:
[
line_length: 120,
inputs: ["mix.exs", "config/*.exs"],
subdirectories: ["apps/*"]
]
But as best I can tell, the line_length
parameter is being ignored.
Given the following code, the longest line (whose length is 102 characters) is always being split into two lines (with the when
clause wrapped to the new line):
defmodule SomeModule do
def lookup_data(parameter1, parameter2) when is_integer(parameter1) and is_integer(parameter2) do
:not_implemented
end
end
In contrast, if I copy & paste the module into the online Elixir formatter and set the line length option to 120, I get no changes to the text (as expected).
I must have screwed up the .formatter.exs
somehow, but for the life of me I can't figure out how.