Steamroller is an opinionated Erlang code formatter.
See the Github README for more info.
Add steamroller to your rebar config:
{plugins, [ {steamroller, {git, "https://github.com/old-reliable/steamroller.git", {branch, "master"}}} ]}.
Then ask it to steamroll your code directly in an existing application:
$ rebar3 steamroll ===> Fetching steamroller ===> Compiling steamroller <Steamroller Output>
You can use steamroller to check that code is properly formatted as part of your CI:
$ rebar3 steamroll --checkThe exit code will be non-zero if the code has not been formatted before being committed.
format_file/1 | Format a file. |
format_file/2 | Format a file with options. |
init/1 | Initialises the rebar3 plugin. |
format_file(File::binary()) -> ok | {error, any()}
Format a file.
format_file(File::binary(), Opts::[any()]) -> ok | {error, any()}
Format a file with options.
init(State::rebar_state:t()) -> {ok, rebar_state:t()}
Initialises the rebar3 plugin.
Generated by EDoc