Skip to content

Comments after the first one in empty struct are not formatted nicely #4854

@ghost

Description

struct Struct {
    // Hello, this is my
    // struct where I haven't added
    // any fields yet.
    // TODO: add fields
}

If you format this code, it becomes:

struct Struct {
    // Hello, this is my
// struct where I haven't added
// any fields yet.
// TODO: add fields
}

I expected it to stay the way it is because it already looks perfectly fine and leaving only the first comment indented looks odd.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions