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

SA1009 - Behavior in Switch expression #3835

Open
modestotech opened this issue May 10, 2024 · 0 comments
Open

SA1009 - Behavior in Switch expression #3835

modestotech opened this issue May 10, 2024 · 0 comments

Comments

@modestotech
Copy link

Version: 1.2.0-beta.556
.NET version: 8

I'm working with a switch expression like below:
image

This gives the SA1009 error.

StyleCop wants me to put it like this:
image

Doesn't look nice, and when reading the in the docs about SA1009 it seems there are some exceptions to this rule (cast), so maybe some logic needed here to handle switch expressions.

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