View Source default_formatter (rebar3_format v1.3.0)
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
-spec format(erl_syntax:syntaxTree(), [pos_integer()], rebar3_formatter:opts()) -> string().
See also: erl_syntax, format/1, layout/2.
-spec format_file(file:filename_all(), nostate, rebar3_formatter:opts()) -> rebar3_formatter:result().
Opts
to configure the formatter.
-spec init(rebar3_formatter:opts(), undefined | rebar_state:t()) -> nostate.