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

.editorconfig csharp_new_line_before_open_brace is wrong with switch expression #45780

Closed
jez9999 opened this issue Jul 8, 2020 · 1 comment

Comments

@jez9999
Copy link

jez9999 commented Jul 8, 2020

I configure my .editorconfig to require K&R-style braces and produce a warning if they're wrong:

# IDE0055: Fix formatting
dotnet_diagnostic.IDE0055.severity = warning

# K&R-style braces
csharp_new_line_before_open_brace = none

However, Allman-style braces are still enforced with a warning for a switch expression such as:

int input = 123;

bool result = input switch {
    246 => true,
    _ => false
};
@vatsalyaagrawal
Copy link
Contributor

Duplicate of #36913

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

2 participants