View Source default_formatter (rebar3_format v1.3.0)

Rebar3 Pretty Printing of abstract Erlang syntax trees, following our own preferred style.

Link to this section Summary

Functions

Pretty-prints/formats an abstract Erlang syntax tree as text in the style of NextRoll.

See also: erl_syntax, format/1, layout/2.

Format a file. Apply formatting rules to a file containing erlang code. Use Opts to configure the formatter.
Initialize the formatter and generate a state that will be passed in when calling other callbacks.

Link to this section Functions

Link to this function

format(Node, EmptyLines, Options)

View Source
-spec format(erl_syntax:syntaxTree(), [pos_integer()], rebar3_formatter:opts()) -> string().
Pretty-prints/formats an abstract Erlang syntax tree as text in the style of NextRoll.

See also: erl_syntax, format/1, layout/2.

Link to this function

format_file(File, _, Opts)

View Source
-spec format_file(file:filename_all(), nostate, rebar3_formatter:opts()) -> rebar3_formatter:result().
Format a file. Apply formatting rules to a file containing erlang code. Use Opts to configure the formatter.
-spec init(rebar3_formatter:opts(), undefined | rebar_state:t()) -> nostate.
Initialize the formatter and generate a state that will be passed in when calling other callbacks.