Skip to content

Conversation

elachlan
Copy link
Contributor

@elachlan elachlan commented Jan 2, 2022

Copy link
Contributor

@sharwell sharwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Consider updating the .globalconfig to increase the severity of SA1520 to warning. Also note that you can achieve similar results using built-in code analysis rule IDE0011:

# IDE0011: Add braces
csharp_prefer_braces = when_multiline:warning
dotnet_diagnostic.IDE0011.severity = warning

@elachlan
Copy link
Contributor Author

elachlan commented Jan 3, 2022

💡 Consider updating the .globalconfig to increase the severity of SA1520 to warning. Also note that you can achieve similar results using built-in code analysis rule IDE0011:

# IDE0011: Add braces
csharp_prefer_braces = when_multiline:warning
dotnet_diagnostic.IDE0011.severity = warning

If #7192 is merged first, then we can enable the rule/s in the .globalconfig

Copy link
Contributor

@Forgind Forgind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistency is good, but having unnecessary curly braces always feels wasteful to me. Little bittersweet, but I believe others were less equivocal when we talked about it.

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 this pull request may close these issues.

3 participants