rebar3_format icon indicating copy to clipboard operation
rebar3_format copied to clipboard

Erlang Formatter for Rebar3

Results 38 rebar3_format issues
Sort by recently updated
recently updated
newest added

In @michalmuskala [words](https://elixirforum.com/t/steamroller-an-opinionated-erlang-code-formatter/27532/44): > `[1 | []]` and `[1]` have exactly the same AST > > That means the formatter won't preserve that source structure, which in some cases might...

configuration idea
started

ℹ️ > Even when this is valid, submitting commented out code in your version control is something we don't recommend at all. Nevertheless, currently, `default_formatter` formats this code… ```erlang -type...

configuration idea
style change

The bug: a comment is getting misplaced. **To reproduce use** ```erlang -type transaction_error() :: no_workers | not_owner | inet:posix(). % from gen_udp:send ``` and `rebar3 format` on top of it....

bug
started

Currently, `default_formatter` formats this code… ```erlang -type x() :: {a, very, long, thing} | {another, very, long, thing} | [yet | another | very | long | thing]. -spec x()...

configuration idea
hacktoberfest
style change

Currently, default_formatter formats this code… ```erlang [A|B] = [X||X

configuration idea
style change

Many Companies and libraries adopt a comma-first indentation in their code base. For example, an export list would look like: ``` -export([ completion/5 , definition/3 , did_open/4 , did_save/1 ,...

configuration idea
style change

Currently, `default_formatter` formats this code… ```erlang a_function(another_function(yet_another_function_with_a_long_name(Rec#a_record.a_field#another_record.another_field))). … #a_record_with_a_long_name{a_field_with_a_very_long_name = #a_record_with_a_long_name{a_field_with_a_very_long_name = #a_record_with_a_long_name{a_field_with_a_very_long_name = b, c = d}}}. ``` …like this… ```erlang a_function(another_function(yet_another_function_with_a_long_name((Rec#a_record.a_field)#another_record.another_field))). … #a_record_with_a_long_name{a_field_with_a_very_long_name = #a_record_with_a_long_name{a_field_with_a_very_long_name = #a_record_with_a_long_name{a_field_with_a_very_long_name =...

configuration idea
style change

Currently, `default_formatter` formats this code… ```erlang IndexedIpAddresses = lists:zip(lists:seq(1, NIpAddresses), IpAddresses), ``` …like this… ```erlang IndexedIpAddresses = lists:zip( lists:seq(1, NIpAddresses), IpAddresses), ``` I would like it to be formatted like...

configuration idea
style change

There are some options which can be specified in .editorconfig file (https://editorconfig.org/) and can be used by code formatter as well: * max_line_length * indent_size * insert_final_newline * charset *...

Currently, `default_formatter` formats this code, when `sort_function_exports` is set to `true`… ```erlang %% assuming both the types and functions exist -export_type([type_c/0, type_a/0, type_b/0, a_first_type/0]). -export([b_fun/0, a_fun/0]). -optional_callbacks([d_fun/0, c_fun/0]). ``` …like...

configuration idea
style change