We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Product and Version Used: Roslynator 4.12
Steps to Reproduce:
private string Test(int i) { var result = string.Empty; switch (i) { case 0: result = i.ToString(); break; case 1: var s = i.ToString(); return s; case 2: return i.ToString(); default: throw new Exception(); } return result; }
Actual Behavior:
private string Test(int i) { var result = string.Empty; switch (i) { case 0: { result = i.ToString(); break; } case 1: { var s = i.ToString(); return s; } case 2: return i.ToString(); default: throw new Exception(); } return result; }
Expected Behavior:
private string Test(int i) { var result = string.Empty; switch (i) { case 0: { result = i.ToString(); break; } case 1: { var s = i.ToString(); return s; } case 2: { return i.ToString(); } default: { throw new Exception(); } } return result; }
The text was updated successfully, but these errors were encountered:
RCS1111 is called "Add braces to switch section with multiple statements". Why do you think is should trigger when there is a single statement?
Sorry, something went wrong.
Yes, you are right. The title says is all.
Anyway it would be nice to have another analyzer "Add braces to switch section" like it exists for if statements (IDE0011).
No branches or pull requests
Product and Version Used: Roslynator 4.12
Steps to Reproduce:
Actual Behavior:
Expected Behavior:
The text was updated successfully, but these errors were encountered: