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

Dangling parentheses check does not handle single-line comments #703

Closed
dtobin opened this issue Jul 18, 2019 · 2 comments
Closed

Dangling parentheses check does not handle single-line comments #703

dtobin opened this issue Jul 18, 2019 · 2 comments

Comments

@dtobin
Copy link
Contributor

dtobin commented Jul 18, 2019

What happened?

The rewrite step introduced by #687 does not correctly handle single-line comments

  foo // this is a comment
)

will be rewritten to

  foo // this is a comment)

which no longer compiles.

This also needs to handle the case where the entire line is a comment, i.e.

  foo
  // whole line is a comment
)

so you probably don't want to move the parenthesis to immediately before the comment

What did you want to happen?

Probably the simplest solution is to perform no rewrite in this case?

@stale
Copy link

stale bot commented Sep 23, 2019

This issue has been automatically marked as stale because it has not been touched in the last 60 days. Please comment if you'd like to keep it open, otherwise it'll be closed in 7 days time.

@stale stale bot added the stale label Sep 23, 2019
@iamdanfox iamdanfox removed the stale label Sep 23, 2019
@iamdanfox
Copy link
Contributor

Closing out because we've delete the dangling parens thing in favour of a code formatter.

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