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

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

Closed
thorhj opened this issue Jan 8, 2025 · 1 comment · Fixed by #1431
Closed

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

thorhj opened this issue Jan 8, 2025 · 1 comment · Fixed by #1431
Milestone

Comments

@thorhj
Copy link

thorhj commented Jan 8, 2025

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

@belav
Copy link
Owner

belav commented Jan 10, 2025

Thanks for the report, the fix will be out in 0.30.6 shortly!

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

Successfully merging a pull request may close this issue.

2 participants