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

[refmt] Formatting of trailing comments in for-loops is not idempotent #1768

Closed
kyldvs opened this issue Jan 22, 2018 · 1 comment
Closed

Comments

@kyldvs
Copy link

kyldvs commented Jan 22, 2018

(what happens to the comment is also probably a bug)

Start here: (try reason link)

for (i in 0 to 1) {
  /* comment */
  print_newline();
  /* comment */
  print_newline()
  /* comment */
};

();

After first refmt:

for (i in 0 to 1)
  {
    /* comment */
    print_newline();
    /* comment */
    print_newline()
  };
  /* comment */

();

After second refmt:

for (i in 0 to 1) {
  /* comment */
  print_newline();
  /* comment */
  print_newline()
};

/* comment */
();
@jordwalke
Copy link
Member

Remaining (more rare) issue tracked here: #1781

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

No branches or pull requests

2 participants