Skip to content

Comments formatted away when commenting out function params #7085

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

Closed
Tracked by #6995
cknitt opened this issue Oct 6, 2024 · 3 comments · Fixed by #7095
Closed
Tracked by #6995

Comments formatted away when commenting out function params #7085

cknitt opened this issue Oct 6, 2024 · 3 comments · Fixed by #7095
Assignees

Comments

@cknitt
Copy link
Member

cknitt commented Oct 6, 2024

Both

f(
  // a,
  // b,
)

and

f(
  // a,
  // b,
  ()
)

are formatted to

f()

so that the comments disappear.

@shulhi
Copy link
Member

shulhi commented Oct 9, 2024

I have a fix for this but I wonder what should we format this to.

f(
  // a,
  // b,
)

Should this get formatted as is or to something like,

// a
// b
f()

@cknitt
Copy link
Member Author

cknitt commented Oct 9, 2024

I think "as is" is fine, as the user most likely wanted to comment out the params temporarily (at least that's how I ran into this), and it stays as close as possible to the input.

@tsnobip
Copy link
Member

tsnobip commented Oct 9, 2024

as is would make sense given that's how it's formatted with parameters.

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

Successfully merging a pull request may close this issue.

3 participants