cds icon indicating copy to clipboard operation
cds copied to clipboard

Boolean AND expression with identical left and right sides

Open chavacava opened this issue 1 year ago • 0 comments

In the following conditional, the Boolean expressions at both sides of the && operator are identical

https://github.com/ovh/cds/blob/77a1606908ee7113a5d23a1f1c0e89211904f6a9/engine/api/workflow/dao.go#L1088-L1090

It seems to be a typo in the slice index: one should be i and the other should be j:

!sdk.IsInInt64Array(int64(i), duplicateHookIdx) && !sdk.IsInInt64Array(int64(j), duplicateHookIdx)

Found with revive

chavacava avatar Oct 01 '22 05:10 chavacava