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: Please expand the reasoning in the "Comments" decision document #146

Closed
david-kubecka opened this issue Sep 17, 2020 · 4 comments
Labels
documentation Improvements or additions to documentation

Comments

@david-kubecka
Copy link

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? :-)
@awalterschulze
Copy link
Contributor

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 awalterschulze added the documentation Improvements or additions to documentation label Sep 18, 2020
@awalterschulze 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
@awalterschulze
Copy link
Contributor

We have done a further analyses of comments here #214

@awalterschulze
Copy link
Contributor

We have expanded it even further now
#220

And have created an issue about supporting trailing comments
#219

@awalterschulze
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants