This module defines the rebar3_formatter behaviour.
Required callback functions: init/2, format_file/3.
opts() = #{output_dir => none | current | file:filename_all(), encoding => none | epp:source_encoding(), action => verify | format, term() => term()}
result() = changed | unchanged
abstract datatype: t()
action/1 | The action that the formatter will perform. |
format_file/2 | Format a file. |
ignore/2 | Process an ignored file. |
new/3 | Build a formatter. |
action(X1::t()) -> verify | format
The action that the formatter will perform.
format_file(File::file:filename_all(), Formatter::t()) -> result()
Format a file. Apply formatting rules to a file containing erlang code.
ignore(File::file:filename_all(), X2::t()) -> ok
Process an ignored file. If output dir is not the current one we need to copy the files that we are not formatting to it
new(Module::module(), Opts::opts(), RebarState::undefined | rebar_state:t()) -> t()
Build a formatter.
Generated by EDoc