View Source sr_formatter (rebar3_format v1.3.0)
Link to this section Summary
Functions
Format a file. Note that opts() are not the same as the global ones passed in on init/1. These opts include per-file options specified with the -format attribute.
Initialize the formatter and generate a state that will be passed in when calling other callbacks.
Link to this section Types
-type state() :: #{opts := proplists:proplist()}.
Link to this section Functions
-spec format_file(file:filename_all(), state(), rebar3_formatter:opts()) -> rebar3_formatter:result().
-spec init(rebar3_formatter:opts(), undefined | rebar_state:t()) -> state().