Add option to use rebar3 fmt instead of standalone erlfmt #4811
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current implementation of the fixer for erlfmt, an Erlang code formatter, invokes a standalone
erlfmt
command. However, the standaloneerlfmt
command is not distributed by default. Instead, erlfmt is often used as a plugin for Rebar3, the de facto build tool for Erlang.This patch introduces a new option
g:ale_erlang_erlfmt_use_rebar
, which is disabled by default, allowing the use ofrebar3 fmt
instead.Additionally, this patch fixes a bug that caused the command to read the original source code rather than the stdin.