Line Length limit (LineLength)¶
Type | Scope | Severity | Activated by default |
Minutes to fix |
Tags |
---|---|---|---|---|---|
Code smell |
BSL OS |
Minor |
Yes |
1 |
standard badpractice |
Parameters¶
Name | Type | Description | Default value |
---|---|---|---|
maxLineLength |
Integer |
Max length of string in characters |
120 |
checkMethodDescription |
Boolean |
Check length of strings in method descriptions |
true |
Description¶
If the line length is grater than 120 characters you should you line break. It is not recommended to have lines longer than 120 characters, except when line break is impossible (example, in code we have a string constant which is displayed without line breaks in message window using object MessageToUser).
Sources¶
- Source: Standard: Modules (RU)
Snippets¶
Diagnostic ignorance in code¶
// BSLLS:LineLength-off
// BSLLS:LineLength-on
Parameter for config¶
"LineLength": {
"maxLineLength": 120,
"checkMethodDescription": true
}