You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm playing with erlfmt and so far it looks promising and well thought out! One of the very few things which I don't like AND don't understand (there are others which I don't like but understand) is the fact that inline comments are forbidden (i.e. the comments are moved to the separate line).
I was briefly trying to find the reasoning behind this decision but the Comments decision document nor the existing issues shed clear light on this. Particularly the decision document mentions only a single criterium "Minimize diff when changing a single line". This is satisfied by both "All comments always on a newline" and "Single comments on the same line", and there's no further reasoning given why the former approach was chosen. Therefore my questions are:
Why the "All comments always on a newline" was chosen? Could you please put that reasoning in the Comments (or possibly separate) decision document?
I know this is controversial topic but would it be possible to make the behaviour configurable? :-)
The text was updated successfully, but these errors were encountered:
Excellent point :D
This discussion is still ongoing and actually has a pull request open #124
Currently, I think we are between picking a trailing comment that is aligned at a fixed column and bringing all comments to the line above. But design considerations have opened up if we don't move the comment to the line above, see the pull request. So in short, I think this is still debatable, rather than configurable.
awalterschulze
changed the title
Please expand the reasoning in the "Comments" decision document
Comments: Please expand the reasoning in the "Comments" decision document
Sep 22, 2020
I believe this also addresses @david-kubecka 's question in #124
And I think this is good enough to close this issue.
Let me know if you have more concerns here
I'm playing with
erlfmt
and so far it looks promising and well thought out! One of the very few things which I don't like AND don't understand (there are others which I don't like but understand) is the fact that inline comments are forbidden (i.e. the comments are moved to the separate line).I was briefly trying to find the reasoning behind this decision but the Comments decision document nor the existing issues shed clear light on this. Particularly the decision document mentions only a single criterium "Minimize diff when changing a single line". This is satisfied by both "All comments always on a newline" and "Single comments on the same line", and there's no further reasoning given why the former approach was chosen. Therefore my questions are:
The text was updated successfully, but these errors were encountered: