Skip to content

Trailing comma is placed on new line if last enum value is followed by a comment #1429

@thorhj

Description

@thorhj

Trailing comma on enum values is formatted incorrectly if the value is followed by a comma. Exactly the same issue as #1354.

Input:

enum MyEnum
{
    First,
    Second // the second value
}

Output:

enum MyEnum
{
    First,
    Second // the second value
    ,
}

Expected behavior:

enum MyEnum
{
    First,
    Second, // the second value
}

Tested with CSharpier.MSBuild 0.30.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions