Skip to content

Comments formatted away when commenting out function params #7085

Closed

Description

@cknitt

Both

f(
  // a,
  // b,
)

and

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

are formatted to

f()

so that the comments disappear.

Activity

  1. self-assigned this
    on Oct 8, 2024
  2. shulhi commented on Oct 9, 2024

    @shulhi
    Member

    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()
  3. cknitt commented on Oct 9, 2024

    @cknitt
    MemberAuthor

    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.

  4. tsnobip commented on Oct 9, 2024

    @tsnobip
    Member

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

  5. added theissue type on Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions