-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
comparison document between erlfmt and other erlang formatters #129
Conversation
Looks like a good highlight of the strengths of erlfmt |
Co-authored-by: Michał Muskała <micmus@whatsapp.com>
…opting out per file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some clarifications regarding rebar3_format
.
At some point I think it would also be worth noting that wherever you mention rebar3_format
in your text, you're actually referring to the default_formatter
within rebar3_format
. You can still use any other formatter with rebar3_format
if you want to (including, of course, erlfmt
).
doc/ErlangFormatterComparison.md
Outdated
|
||
## Macros | ||
|
||
One of the biggest lacking features with current Erlang formatters in handling of macros. For example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the biggest lacking features with current Erlang formatters in handling of macros. For example: | |
One of the biggest lacking features with current Erlang formatters is the handling of macros. For example: |
doc/ErlangFormatterComparison.md
Outdated
|
||
## Opt In/Out | ||
|
||
`erlfmt` is the only Erlang formatter, as far as we know, that allows you to opt-in per file and opt-out per top-level expression. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rebar3_format
allows you to opt out from formatting, by adding -format ignore.
in files, or by adding an ignore
configuration option either in rebar.config
or when running rebar3 format
in the command line with a blob of the files you want not to format.
That applies regardless of the formatter you choose. If you happen to use erlfmt
within rebar3_format
, you can also use @format
, of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some clarifications regarding
rebar3_format
.At some point I think it would also be worth noting that wherever you mention
rebar3_format
in your text, you're actually referring to thedefault_formatter
withinrebar3_format
. You can still use any other formatter withrebar3_format
if you want to (including, of course,erlfmt
).
Very good point. I have added a clarifying sentence to the top, right below the table.
HA! That's synchronicity :P |
@elbrujohalcon I think I have addressed your comments. Let me know if I missed something, because this would be unintentional. |
My understanding is that no formatters so far are capable of formatting |
We are aware :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @awalterschulze 🙏
|Opt In/Out |per file, per top level expression |per file |No |No | | ||
|Speed |OTP lib in 7s |N/A |N/A |N/A | | ||
|
||
See the [comparison with other erlang formatters document](./doc/ErlangFormatterComparison.md) for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should move this section a bit below, especially below install/usage instructions. What do you think?
Perhaps we need a small ToC at the beginning of the readme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep the references as close as possible to the content, but a TBC is a great idea.
I'll add one in a following pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request for TBC #132
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is generally good to go
No description provided.