cds icon indicating copy to clipboard operation
cds copied to clipboard

Issue found by Svace static analyzer

Open vvdvortsova opened this issue 4 years ago • 0 comments

Hello This warning found with the Svace. Redundant comparison with nil for n. https://github.com/ovh/cds/blob/f8d2b30d4b400f9ea0ac2612d5d4a2a196447935/sdk/exportentities/v1/workflow.go#L454 Because there is checking for error before. https://github.com/ovh/cds/blob/f8d2b30d4b400f9ea0ac2612d5d4a2a196447935/sdk/exportentities/v1/workflow.go#L442

vvdvortsova avatar Jun 08 '21 16:06 vvdvortsova

no. By reading only processNodeAncestors, it's more clear to check nil on n here, without reading getNode in details.

yesnault avatar Sep 19 '22 10:09 yesnault