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

Comma insertion with a comment suffix #1356

Closed
Hona opened this issue Oct 8, 2024 · 1 comment
Closed

Comma insertion with a comment suffix #1356

Hona opened this issue Oct 8, 2024 · 1 comment

Comments

@Hona
Copy link

Hona commented Oct 8, 2024

@belav

Currently we get a line break and the comma inserted, I think it would be simpler to add the comma before the comment.

Thoughts?

Input:

var option = Options.A;

var value = option switch
{
    Options.A => "A",
    Options.B => "B",
    Options.C => "C" // comment line
    
};

public enum Options
{
    A,
    B,
    C,
}

Output:

var option = Options.A;

var value = option switch
{
    Options.A => "A",
    Options.B => "B",
    Options.C =>
        "C" // comment line
    ,
};

public enum Options
{
    A,
    B,
    C,
}

Expected behavior:

var option = Options.A;

var value = option switch
{
    Options.A => "A",
    Options.B => "B",
    Options.C => "C", // comment line
};

public enum Options
{
    A,
    B,
    C,
}
@Hona
Copy link
Author

Hona commented Oct 8, 2024

Ah, duplicate of #1354 . Sorry.

@Hona Hona closed this as not planned Won't fix, can't repro, duplicate, stale Oct 8, 2024
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

No branches or pull requests

1 participant