Skip to content

Commit e2aa8d8

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents b920939 + 870f3d8 commit e2aa8d8

File tree

3 files changed

+57
-24
lines changed

3 files changed

+57
-24
lines changed

docs/en/diagnostics/NestedStatements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Managing statements should not not be bested too deep
1+
# Control flow statements should not be nested too deep
22

33
Nested "If", "For", "ForEach", "While" and "Try" operators are key ingredients for so called "spaghetti-code".
44

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Useless collection iteration
2+
3+
The absence of an iterator in the loop body indicates either a useless iteration of the collection or an error in the loop body.
4+
5+
Incorrect:
6+
7+
```Bsl
8+
9+
Для Каждого Итератор Из Коллекция Цикл
10+
11+
ВыполнитьДействиеНадЭлементом(Коллекция);
12+
13+
КонецЦикла;
14+
15+
```
16+
17+
Correct:
18+
19+
```Bsl
20+
21+
Для Каждого Итератор Из Коллекция Цикл
22+
23+
ВыполнитьДействиеНадЭлементом(Итератор);
24+
25+
КонецЦикла;
26+
27+
```
28+
29+
```
30+
31+
ВыполнитьДействиеНадКоллекцией(Коллекция);
32+
33+
```

docs/en/index.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -126,32 +126,32 @@ Used for code analysis to meet coding standards and search for possible errors.
126126

127127
### Implemented diagnostics
128128

129-
- [CanonicalSpellingKeywords - Canonical Keywords Spelling ](diagnostics/CanonicalSpellingKeywords.md)
130-
- [DeprecatedMessage - Restriction on using of the obsolete method "Message"](diagnostics/DeprecatedMessage.md)
131-
- [EmptyCodeBlock - Empty Code Block](diagnostics/EmptyCodeBlock.md)
132-
- [EmptyStatement - Empty Statement](diagnostics/EmptyStatement.md)
133-
- [FunctionShouldHaveReturn - Function Should Have Return](diagnostics/FunctionShouldHaveReturn.md)
134-
- [IfElseDuplicatedCodeBlockDiagnostic - If...Else Duplicated Code Block](diagnostics/IfElseDuplicatedCodeBlock.md)
135-
- [IfElseDuplicatedConditionDiagnostic - If...Else Duplicated Condition](diagnostics/IfElseDuplicatedCondition.md)
136-
- [IfElseIfEndsWithElse - If...ElseIf Ends With Else](diagnostics/IfElseIfEndsWithElse.md)
137-
- [LineLength - Line Length](diagnostics/LineLength.md)
138-
- [MethodSize - Method Size](diagnostics/MethodSize.md)
129+
- [CanonicalSpellingKeywords - Canonical spelling of keywords ](diagnostics/CanonicalSpellingKeywords.md)
130+
- [DeprecatedMessage - Restriction on the use of deprecated "Message" method](diagnostics/DeprecatedMessage.md)
131+
- [EmptyCodeBlock - Empty code block](diagnostics/EmptyCodeBlock.md)
132+
- [EmptyStatement - Empty Ssatement](diagnostics/EmptyStatement.md)
133+
- [FunctionShouldHaveReturn - Function must have Return statement](diagnostics/FunctionShouldHaveReturn.md)
134+
- [IfElseDuplicatedCodeBlockDiagnostic - Duplicated code blocks in If...Then...ElsIf...](diagnostics/IfElseDuplicatedCodeBlock.md)
135+
- [IfElseDuplicatedConditionDiagnostic - Duplicated conditions in If...Then...ElsIf...](diagnostics/IfElseDuplicatedCondition.md)
136+
- [IfElseIfEndsWithElse - Using If...Then...ElsIf... statement](diagnostics/IfElseIfEndsWithElse.md)
137+
- [LineLength - Line length restriction](diagnostics/LineLength.md)
138+
- [MethodSize - Method size restriction](diagnostics/MethodSize.md)
139139
- [NestedConstructorsInStructureDeclaration - Nested constructors with parameters in structure declaration](diagnostics/NestedConstructorsInStructureDeclaration.md)
140-
- [NestedStatements - Managing statements should not be nested too deep](diagnostics/NestedStatements.md)
140+
- [NestedStatements - Control flow statements should not be nested too deep](diagnostics/NestedStatements.md)
141141
- [NestedTernaryOperator - Nested Ternary Operator](diagnostics/NestedTernaryOperator.md)
142-
- [NumberOfOptionalParams - Number Of Optional Parameters in Method](diagnostics/NumberOfOptionalParams.md)
143-
- [NumberOfParams - Number Of Parameters in Method](diagnostics/NumberOfParams.md)
144-
- [NumberOfValuesInStructureConstructor - Restriction on the number of property values ​​passed to the structure constructor](diagnostics/NumberOfValuesInStructureConstructor.md)
142+
- [NumberOfOptionalParams - Number of optional method parameters restriction](diagnostics/NumberOfOptionalParams.md)
143+
- [NumberOfParams - Number of method parameters restriction](diagnostics/NumberOfParams.md)
144+
- [NumberOfValuesInStructureConstructor - Number of values in structure constructor restriction](diagnostics/NumberOfValuesInStructureConstructor.md)
145145
- [OneStatementPerLine - One Statement Per Line](diagnostics/OneStatementPerLine.md)
146-
- [ParseError - Source code parse error](diagnostics/ParseError.md)
147-
- [OrderOfParams - Order Of Parameters in Method](diagnostics/OrderOfParams.md)
148-
- [ProcedureReturnsValue - Procedure should not return Value](diagnostics/ProcedureReturnsValue.md)
149-
- [SemicolonPresence - Statement should end with Semicolon](diagnostics/SemicolonPresence.md)
150-
- [SelfAssign - Variable is Assigned to itself](diagnostics/SelfAssign.md)
146+
- [ParseError - Error parsing source code](diagnostics/ParseError.md)
147+
- [OrderOfParams - Order of method parameters](diagnostics/OrderOfParams.md)
148+
- [ProcedureReturnsValue - Procedure must have no Return statement](diagnostics/ProcedureReturnsValue.md)
149+
- [SemicolonPresence - Statement should end with ";"](diagnostics/SemicolonPresence.md)
150+
- [SelfAssign - Variable self assignment](diagnostics/SelfAssign.md)
151151
- [TryNumber - Cast to number in try catch block](diagnostics/TryNumber.md)
152152
- [UnknownPreprocessorSymbol - Unknown Preprocessor Symbol](diagnostics/UnknownPreprocessorSymbol.md)
153-
- [UseLessForEach - Useless collection iteration](diagnostics/UseLessForEach.md)
154-
- [UsingCancelParameter - Using Cancel Parameter](diagnostics/UsingCancelParameter.md)
155-
- [UsingFindElementByString - Using the methods "FindByDescription" and "FindByCode"](diagnostics/UsingFindElementByString.md)
153+
- [UseLessForEach - Useless For Each loop](diagnostics/UseLessForEach.md)
154+
- [UsingCancelParameter - Using "Cancel" parameter](diagnostics/UsingCancelParameter.md)
155+
- [UsingFindElementByString - Restriction on the use of "FindByDescription" and "FindByCode" methods](diagnostics/UsingFindElementByString.md)
156156
- [UsingServiceTag - Using service tags](diagnostics/UsingServiceTag.md)
157-
- [YoLetterUsageDiagnostic - Yo Letter Usage in code](diagnostics/YoLetterUsage.md)
157+
- [YoLetterUsageDiagnostic - Using "Ё" letter in code](diagnostics/YoLetterUsage.md)

0 commit comments

Comments
 (0)