Skip to main content

RCS0021: Format block's braces on a single line or multiple lines

Properties

PropertyValue
Default Severitydisabled by default
Minimum language version-

Examples

Example #1

diagnostic.cs
void Foo() { Bar(); }
fix.cs
void Foo()
{
Bar();
}

Configuration

info

Option roslynator_block_braces_style is required to be set for this analyzer to work.

.editorconfig
# Format block's braces on single line or multiple lines
# Default value is multi_line
roslynator_block_braces_style = multi_line|single_line_when_empty

Applies to