exml icon indicating copy to clipboard operation
exml copied to clipboard

Format code with rebar3_format plugin

Open michalwski opened this issue 5 years ago • 4 comments

Inspired by http://tech.nextroll.com/blog/dev/2020/02/25/erlang-rebar3-format.html I wanted to try the rebar3 format plugin with exml.

michalwski avatar Mar 16 '20 13:03 michalwski

@elbrujohalcon we tried rebar3 format in this project and found some strange formatting issues. I hope this could be helpful for you in developing the tool and/or maybe you can tell us if at least some of the issues can be solved by configuration.

michalwski avatar Mar 16 '20 14:03 michalwski

@michalwski I replied to most comments. The basic idea to wrap your head around here is that the formatter doesn't care about your current code style. It reads AST and prints Erlang code. So… it can't preserve any format you introduced "by hand" and that's by design.

elbrujohalcon avatar Mar 16 '20 14:03 elbrujohalcon

Please keep open bug reports and other issues on the rebar3_format repo folks. It's highly appreciated.

elbrujohalcon avatar Mar 17 '20 08:03 elbrujohalcon

Thanks for the review, @elbrujohalcon, and for pushing the formatter initiative forward!

erszcz avatar Mar 17 '20 08:03 erszcz