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

Wrong placement of comment #160

Closed
david-kubecka opened this issue Sep 19, 2020 · 1 comment
Closed

Wrong placement of comment #160

david-kubecka opened this issue Sep 19, 2020 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@david-kubecka
Copy link

Input:

f(1,
    2). % comment

Result:

f(
    1,
    % comment
    2
).

This is IMO wrong since the comment clearly belongs to the whole f(...) expression so the result should rather be:

% comment
f(
    1,
    2
).

Or, preferably, keep the comment inlined:

f(
    1,
    2
). % comment
@michalmuskala
Copy link
Member

michalmuskala commented Sep 21, 2020

This is very similar to what's happening in #134 and #165 that comes from our very simple rules on handling trailing comments. Since there's more discussion around this happening in #134, I'm going to close this issue in favour of the discussion happening there.

Thank you for your feedback and trying erlfmt out! ❤️

@michalmuskala michalmuskala added the duplicate This issue or pull request already exists label Sep 21, 2020
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