Skip to content

Commit cee4cc6

Browse files
authored
Merge pull request #3014 from 1c-syntax/translations_docs-diagnostics-incorrectlinebreak-md--develop_en
Translate 'docs/diagnostics/IncorrectLineBreak.md' in 'en'
2 parents b517102 + 865d903 commit cee4cc6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/en/diagnostics/IncorrectLineBreak.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ Complex logical conditions in If ... ElseIf ... EndIf should be carried as follo
1818
* logical operators AND, OR are placed at the beginning of a line, and not at the end of the previous line;
1919
* all conditions are preceded by the standard first indent, or they are aligned at the start of work without taking into account the logical operator (it is recommended to use spaces to align expressions relative to the first line).
2020

21+
**Examples of configuring exclusions:**
22+
23+
- If your design standard requires a closing brace and statement separator ";" were written *after* the line containing the last parameter, then you need to change the `listOfIncorrectFirstSymbol` parameter
24+
- instead of the substring `|\);` (at the end of the setting) you need to write the substring `|\)\s*;\s*\S+`
25+
- final version `\)|;|,\s*\S+|\)s*;\s*\S+`
26+
- code example is listed in the examples section
27+
28+
Without the specified setting, the rule will issue notes on the closing bracket and the operator separator ";", located on a separate line
29+
2130
## Examples
2231
<!-- В данном разделе приводятся примеры, на которые диагностика срабатывает, а также можно привести пример, как можно исправить ситуацию -->
2332

@@ -45,6 +54,25 @@ AmountDocument = AmountWithoutDiscount
4554
+ AmountAutomaticDiscount;
4655
```
4756

57+
An example of a possible arrangement of parameters and a closing bracket with the operator separator ";"
58+
59+
```bsl
60+
Names = New ValueList;
61+
Names.Add(Name,
62+
Synonym);
63+
```
64+
65+
An example of a possible location of the closing bracket with the operator separator ";" on a separate line:
66+
- without changing the `listOfIncorrectFirstSymbol` parameter (see above), the diagnostics will generate a issue for such expression wrapping.
67+
68+
```bsl
69+
Names = New ValueList;
70+
Names.Add(
71+
Name,
72+
Synonym
73+
);
74+
```
75+
4876
## Sources
4977
<!-- Необходимо указывать ссылки на все источники, из которых почерпнута информация для создания диагностики -->
5078

0 commit comments

Comments
 (0)