View Source Styler.Style.Defs (Styler v0.2.0)

NOT ENABLED Currently has a bug where it puts comments into bad places no matter what, since it's always rewriting every head. It's been run on our codebase once though...


Styles function heads so that they're as small as possible.

The goal is that a function head fits on a single line.

This isn't a Credo issue, and the formatter is fine with either approach. But Styler has opinions!

Ex:

This long declaration

def foo(%{
  bar: baz
}) do
  ...
end

Becomes

def foo(%{bar: baz}) do
  ...
end

Link to this section Summary

Functions

Callback implementation for Styler.Style.run/1.

Link to this section Functions

Callback implementation for Styler.Style.run/1.