We’re very happy to announce the general availability of erlfmt - an automated code formatter for Erlang.
erlfmt is an opinionated Erlang code formatter. By automating the process of formatting the code, it frees your team up to focus on what the code does, instead of what it looks like. erlfmt works with any Erlang file: .erl
, .hrl
, rebar.config
, escripts, and more. It can be used both in rebar3 projects and standalone as a precompiled escript.
erlfmt is feature complete and now is a final opportunity, before the release of version 1.0.0, to influence formatting decisions. We would appreciate your feedback, try out erlfmt on your project and share your remarks by opening a github issue with examples.
Comparison with other erlang formatters
In it’s design approach erlfmt is very similar to the Elixir formatter - it should feel very familiar for most Elixir users. The formatter never changes the semantics or structure of the code. It provides as little configuration as possible. It also avoids special cases as much as possible. Elixir users will also find the familiar behaviour of preserving newlines and respecting some other elements of the original format.
Links
- GitHub: GitHub - WhatsApp/erlfmt: An automated code formatter for Erlang
- Hex: erlfmt | Hex
- Usage instructions: GitHub - WhatsApp/erlfmt: An automated code formatter for Erlang