View Source sr_formatter (rebar3_format v1.3.0)

Formatter to integrate with steamroller.

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

Link to this function

format_file(File, _, OptionsMap)

View Source
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.
-spec init(rebar3_formatter:opts(), undefined | rebar_state:t()) -> state().
Initialize the formatter and generate a state that will be passed in when calling other callbacks.