ale
ale copied to clipboard
Add option to use rebar3 fmt instead of standalone erlfmt
The current implementation of the fixer for erlfmt, an Erlang code formatter, invokes a standalone erlfmt command. However, the standalone erlfmt 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 of rebar3 fmt instead.
Additionally, this patch fixes a bug that caused the command to read the original source code rather than the stdin.
@w0rp Thank you for your feedback! I have addressed the points you raised. Could you please review the changes again?
This pull request has been automatically marked as stale because it has not been updated recently. Make sure to write tests and document your changes. See :help ale-dev for information on writing tests.
If your pull request is good to merge, bother w0rp or another maintainer again, and get them to merge it.
I'll close this until it can be reworked and rebased a little. It might make sense to make rebar3 by default, if that makes sense.