[erlang-questions] [ANN] erlang-formatter 1.0.0 (go fmt for Erlang)
Sun Aug 28 14:53:56 CEST 2016
Ah so I tried erl_tidy and like Tristan says over at
Oh boy my specs!
erlang-mode does not rewrite code in the same sense as erl_tidy.
Instead it behaves as if one was pressing the TAB key on each line of a
file, thus only changing space to the left of the current line.
Even though I like erl_tidy's "unclobbering or commas" (it turns A,B,C into
A, B, C)
I very much prefer erlang-mode's "preservation of \ns": it only changes the
How do you handle the cases where erl_tidy spews out AST code instead of
@Max 4 spaces, although that is configurable somewhere.
This feature needs confirmation though: that's 4. in
On 28 August 2016 at 14:06, Mark Bucciarelli <mkbucc@REDACTED> wrote:
> I had the same itch!
> * http://erlang.org/pipermail/erlang-questions/2016-April/088975.html
> * https://github.com/mbucc/erlfmt (which grew out of that thread)
> I use it whenever I am coding with Erlang (and it also helped expose an
> erl_tidy bug  :).
>  https://github.com/erlang/otp/commit/0969ecad9e2978bacb7b27f663cd16
> On Sun, Aug 28, 2016 at 6:01 AM, Pierre Fenoll <pierrefenoll@REDACTED>
>> We had too many discussions about style on a lengthy open source Erlang
>> project (2600Hz's Kazoo).
>> We have now as part of our CI checks a style-ensuring tool that formats
>> .erl .hrl .app.src .escript
>> in the "standard format" of Emacs' erlang-mode.
>> https://github.com/fenollp/erlang-formatter is now in version 1.
>> We use it daily which helps us redirect our shouting at CircleCI instead
>> of colleagues.
>> And shouting is certainly great to redirect
>> This implementation uses emacs > 23 under the hood.
>> * It was the fastest & shortest way to implement
>> * erlang-mode is the closest thing to a standard there is for formatting
>> Some other tools / implementations are listed in the project's README.
>> So far this project helped uncover 4 bugs in erlang-mode which I minified
>> & reported.
>> I share this in hope that this can help people & tame some shouting.
>> A non-Emacs implementation would be amazing (probably faster, more
>> With your help this project can turn into a test bed for such an
>> A rebar3 fmt plugin is in the works.
>> Please tell me what you think but I don't care about your religious
>> beliefs :)
>> Pierre Fenoll
>> erlang-questions mailing list
> Blogging at markbucciarelli.com
> Tweeting @mbucc
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions