Skip to content

Commit 8ea5909

Browse files
author
Nikolay Babin
committed
G5V8DT-26943 Исключить срабатывание проверки на секции Пример
* Добавить сценарий в тестовый кейс * Количество маркеров и их положение не изменяется
1 parent e3244eb commit 8ea5909

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

bundles/com.e1c.v8codestyle.bsl/src/com/e1c/v8codestyle/bsl/comment/check/MultilineDescriptionEndsOnDotCheck.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ protected void checkDocumentationCommentObject(IDescriptionPart object, BslDocum
100100
.orElse(null);
101101
//@formatter:on
102102

103-
if (lastPart == null || startLine == lastPart.getLineNumber())
103+
if (lastPart == null || startLine == lastPart.getLineNumber() || isParentExampleSection(root, lastPart))
104104
{
105105
return;
106106
}
@@ -120,4 +120,10 @@ protected void checkDocumentationCommentObject(IDescriptionPart object, BslDocum
120120
lastPart.getLineNumber(), lastPart.getOffset(), lastPart.getText().length());
121121

122122
}
123+
124+
private boolean isParentExampleSection(BslDocumentationComment root, TextPart lastPart)
125+
{
126+
return root.getExampleSection() != null
127+
&& root.getExampleSection().getDescription().getParts().contains(lastPart);
128+
}
123129
}

tests/com.e1c.v8codestyle.bsl.itests/resources/doc-comment-description-ends-on-dot.bsl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,13 @@ EndProcedure
1010
Procedure Complaint() Export
1111
// empty
1212
EndProcedure
13+
14+
// First line
15+
// second line.
16+
// Example:
17+
// if true then
18+
// NonComplaint();
19+
// EndIf;
20+
Procedure Complaint() Export
21+
// empty
22+
EndProcedure

0 commit comments

Comments
 (0)