Skip to main content

RCS0051: Add/remove new line before 'while' in 'do' statement

Properties

PropertyValue
Default Severitydisabled by default
Minimum language version-

Examples

Example #1

diagnostic.cs
do
{
Foo();
} while (x);
fix.cs
do
{
Foo();
}
while (x);

Configuration

info

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

.editorconfig
# Include/omit new line before 'while' in 'do' statement
roslynator_new_line_before_while_in_do_statement = true|false

Applies to