You've already forked v8-code-style
mirror of
https://github.com/1C-Company/v8-code-style.git
synced 2025-12-02 17:13:44 +02:00
Merge pull request #1049 from 1C-Company/bugfix/993-ref-link-fix
#993 Учет точки в конце ссылки на метод
This commit is contained in:
@@ -1,15 +1,29 @@
|
||||
|
||||
// Non complaint.
|
||||
//
|
||||
// Parameters:
|
||||
// Parameters - See Complaint.UnknownParameter
|
||||
Procedure NonComplaint(Parameters) Export
|
||||
// empty
|
||||
EndProcedure
|
||||
// LinkToMethodParameter - See Complaint.UnknownParameter
|
||||
// LinkToMethod - See NonComplaint()
|
||||
// LinkToExtMethod - See Catalogs.Products.NonComplaint()
|
||||
//
|
||||
// Returns:
|
||||
// AnyRef - any ref
|
||||
Function NonComplaint(LinkToMethodParameter, LinkToMethod, LinkToExtMethod) Export
|
||||
// empty
|
||||
EndFunction
|
||||
|
||||
// See this description
|
||||
//
|
||||
// Parameters:
|
||||
// Parameters - Here valid web-link See https://1c.ru
|
||||
// LinkToMethod - See NonComplaint()
|
||||
Procedure Complaint(Parameters, LinkToMethod) Export
|
||||
// empty
|
||||
// WebLink - String - Here valid web-link See https://1c.ru
|
||||
// LinkToMethod - See NonComplaint
|
||||
// LinkToExtMethod - See Catalogs.Products.NonComplaint
|
||||
// LinkToParameter - See NonComplaint.LinkToExtMethod
|
||||
Procedure Complaint(WebLink, LinkToMethod, LinkToExtMethod, LinkToParameter) Export
|
||||
// empty
|
||||
EndProcedure
|
||||
|
||||
// See Catalogs.Products.Complaint.
|
||||
Procedure Complaint2(WebLink, LinkToMethod, LinkToExtMethod)
|
||||
// empty
|
||||
EndProcedure
|
||||
|
||||
@@ -15,6 +15,8 @@ package com.e1c.v8codestyle.bsl.comment.check.itests;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -31,12 +33,33 @@ import com.e1c.v8codestyle.bsl.comment.check.RefLinkPartCheck;
|
||||
public class RefLinkPartCheckTest
|
||||
extends AbstractSingleModuleTestBase
|
||||
{
|
||||
private static final String PROJECT_NAME = "EventHandlerBooleanParam";
|
||||
|
||||
private static final String MODULE_FILE_NAME = "/src/Catalogs/Products/ManagerModule.bsl";
|
||||
|
||||
public RefLinkPartCheckTest()
|
||||
{
|
||||
super(RefLinkPartCheck.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean enableCleanUp()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getTestConfigurationName()
|
||||
{
|
||||
return PROJECT_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getModuleFileName()
|
||||
{
|
||||
return MODULE_FILE_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the documentation comment contains valid links
|
||||
*
|
||||
@@ -48,8 +71,12 @@ public class RefLinkPartCheckTest
|
||||
updateModule(FOLDER_RESOURCE + "doc-comment-ref-link.bsl");
|
||||
|
||||
List<Marker> markers = getModuleMarkers();
|
||||
assertEquals(1, markers.size());
|
||||
Marker marker = markers.get(0);
|
||||
assertEquals("3", marker.getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY));
|
||||
assertEquals(2, markers.size());
|
||||
|
||||
Set<String> lines = markers.stream()
|
||||
.map(marker -> marker.getExtraInfo().get(IExtraInfoKeys.TEXT_EXTRA_INFO_LINE_KEY))
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
assertEquals(Set.of("5", "7"), lines);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user