Skip to content
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

Comments: Allow trailing comments #172

Closed
paulo-ferraz-oliveira opened this issue Sep 21, 2020 · 6 comments
Closed

Comments: Allow trailing comments #172

paulo-ferraz-oliveira opened this issue Sep 21, 2020 · 6 comments
Labels
duplicate This issue or pull request already exists

Comments

@paulo-ferraz-oliveira
Copy link

I see that erlfmt removes trailing comments (the best it can) and places them in a line "above". Why?

My reasoning is usually this: if it's trailing it pertains to a single line. If it's above a line it "might" pertain to a block of code.

Examples follow:

Value = Value0, % I want to signal intention (there's no conversion here!)
maps:get(face, Value)

and

ok = and_there(i_was),

% You'll like this next one
_Commented = commenting_away_on_erlfmt(),
Dragon = when_all_of_a_sudden(),
Water = nothing_happened(),

Which = is_why()
@awalterschulze awalterschulze changed the title Allow trailing comments Comments: Allow trailing comments Sep 22, 2020
@awalterschulze awalterschulze added the discussion Issue requires further discussion before solving label Sep 22, 2020
@awalterschulze
Copy link
Member

Thank you for bringing this up. Discussion on this is ongoing #124

@paulo-ferraz-oliveira
Copy link
Author

paulo-ferraz-oliveira commented Oct 28, 2020

This is no longer an issue, to me. You're welcome to close it if there's no more work planned on top of it. (also #124 is already merged)

@awalterschulze
Copy link
Member

May I ask why this is no longer an issue for you? That could be very interesting for future users raising the same issue
I just want to be clear that just because a formatting decision has been merged, does not mean it is done, see the Readme
https://github.com/WhatsApp/erlfmt/blob/master/doc/Readme.md#formatting-decisions

@paulo-ferraz-oliveira
Copy link
Author

I believe the work done, in #124, is enough for this issue to lose relevance.

@awalterschulze
Copy link
Member

Okay cool thanks, that is great to know :)

@awalterschulze awalterschulze added duplicate This issue or pull request already exists and removed discussion Issue requires further discussion before solving labels Nov 4, 2020
@awalterschulze
Copy link
Member

This can also be seen as a duplicate of #219

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants