Skip to content

One statement per line (OneStatementPerLine)

Type Scope Severity Activated
by default
Minutes
to fix
Tags
Code smell BSL
OS
Minor Yes 2 standard
design

Description

Module texts are formatted according to the "one statement in one line" principle. Several statements are acceptable in case of same-type assignment operators. For example:

StartIndex = 0; Index = 0; Result = 0;

Sources

Snippets

Diagnostic ignorance in code

// BSLLS:OneStatementPerLine-off
// BSLLS:OneStatementPerLine-on

Parameter for config

"OneStatementPerLine": false