rebar3_erlalign_prv (erlalign v0.1.5)

View Source

rebar3 provider for ErlAlign column-aligning formatter.

Provides the 'format' rebar3 command to format Erlang source code with column alignment on top of erlfmt output.

Usage: rebar3 format [options] [files]

Options: --line-length N Maximum line length (default: 98) --check Check formatting without modifying files --dry-run Show what would be formatted -o, --output FILE Write output to FILE instead of source (single file only) -s, --silent Suppress output -h, --help Show help message

If no files or directories are specified, all .erl files in src/ and app/*/src/ will be formatted.

Examples: rebar3 format # Format all Erlang files rebar3 format --line-length 120 # Format with longer lines rebar3 format --check src/ # Check src/ directory rebar3 format --dry-run src/mymodule.erl rebar3 format -o /tmp/output.erl src/mymodule.erl # Save to different file

Summary

Functions

do(State)

-spec do(rebar_state:t()) -> {ok, rebar_state:t()} | {error, string()}.

format_error(Reason)

-spec format_error(any()) -> iolist().

init(State)

-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.

provider()

-spec provider() -> {atom(), list()}.