rebar3_format icon indicating copy to clipboard operation
rebar3_format copied to clipboard

Erlang Formatter for Rebar3

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

**Describe the bug** Function definitions ends up in a unique, long line. Before formatting: ```erlang handle_handoff_command(?FOLD_REQ{foldfun=FoldFun, acc0=Acc0}, _Sender, State = #{data := Data}) -> log("Received fold request for handoff", State),...

bug

Currently, `default_formatter` formats this code… ```erlang ["POST", $\n, "/", $\n, "", $\n, "x-amz-content-sha256:", Hash, $\n, "x-amz-date:", Date, $\n, $\n, "x-amz-content-sha256;x-amz-date", $\n, ``` …like this… ```erlang ["POST", $\n, "/", $\n, "",...

configuration idea
style change

**Describe the bug** Formatter remove single quotes from macros containing dashes. **To Reproduce** The code below: ```erlang -define(CCR_INITIAL, ?'CC-REQUEST-TYPE_INITIAL_REQUEST'). -define(CCR_UPDATE, ?'CC-REQUEST-TYPE_UPDATE_REQUEST'). -define(CCR_TERMINATE, ?'CC-REQUEST-TYPE_TERMINATION_REQUEST'). -define(MSISDN, ?'SUBSCRIPTION-ID-TYPE_END_USER_E164'). -define(IMSI, ?'SUBSCRIPTION-ID-TYPE_END_USER_IMSI'). ``` becomes: ```erlang...

bug

**Describe the bug** Running `rebar3_format` on a DOS/Windows text file with CRLF endings will result in LF. **To Reproduce** Run this script on a Windows system with Erlang/OTP and `rebar3`...

bug

Currently, formatter add new like and try keep braces at the same like with items, fields: **Record** ```erlang -record(z_msg_v1, {qos = 0 :: 0 | 1 | 2, dup =...

configuration idea
style change

Currently formatter add spaces in empty maps etc. with config: ```erlang {format, [{ options, #{ spaces_around_fields => true } }]}. ``` will format empty map like ```erlang #{ } ```...

configuration idea
style change

Currently formatter add spaces in maps, tuples, records with config: ```erlang {format, [{ options, #{ spaces_around_fields => true } }]}. ``` will format empty data like ```erlang #{ a =>...

configuration idea
style change

From https://github.com/erlang-ls/erlang_ls/issues/1168 I've got the following macro: ```erlang % note the parens: -define(METRICS, (application:get_env(?APP, metrics_module, ?DEFAULT_METRICS_MODULE))). % ^ ^ ``` ...which I use like this: ```erlang notify_cache_hit() -> ?METRICS:increment(cache_hits). ```...

bug

**Describe the bug** the following attribute `-'🗣️'(foo).` will be formatted without the quotes the first time it's formatted and as an error the second time. **To Reproduce** add the attribute...

bug

`erlfmt_formatter_SUITE` and `sr_formatter_SUITE`, which both derive path to `test_app` from `code:priv_dir`, fail on Windows, because there it points to `_build/test/rebar3_format/priv`. I imagine it has something to do with Windows not...

bug