[ 
https://issues.apache.org/jira/browse/YUNIKORN-2787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Craig Condit closed YUNIKORN-2787.
----------------------------------

> Eliminate gosec lint warnings 
> ------------------------------
>
>                 Key: YUNIKORN-2787
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2787
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: core - common
>            Reporter: Peter Bacsko
>            Assignee: Peter Bacsko
>            Priority: Minor
>              Labels: pull-request-available
>
> Use the nolint directive to get rid of the following warnings from the test 
> code
> {noformat}
> pkg/scheduler/objects/node_collection_test.go:315:18: G602: Potentially 
> accessing slice out of bounds (gosec)
>       assert.Equal(t, nodes[0].NodeID, "node-2", "wrong node 0")
>                       ^
> pkg/scheduler/objects/node_collection_test.go:316:18: G602: Potentially 
> accessing slice out of bounds (gosec)
>       assert.Equal(t, nodes[1].NodeID, "node-4", "wrong node 1")
>                       ^
> pkg/scheduler/objects/node_collection_test.go:317:18: G602: Potentially 
> accessing slice out of bounds (gosec)
>       assert.Equal(t, nodes[2].NodeID, "node-1", "wrong node 2")
>                       ^
> pkg/scheduler/objects/node_collection_test.go:318:18: G602: Potentially 
> accessing slice out of bounds (gosec)
>       assert.Equal(t, nodes[3].NodeID, "node-3", "wrong node 3")
>                       ^
> pkg/scheduler/objects/nodesorting_test.go:200:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node1.NodeID, nodes[0].NodeID, "wrong initial node 
> (fair)")
>                                     ^
> pkg/scheduler/objects/nodesorting_test.go:201:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node2.NodeID, nodes[1].NodeID, "wrong second node 
> (fair)")
>                                     ^
> pkg/scheduler/objects/nodesorting_test.go:214:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node2.NodeID, nodes[0].NodeID, "wrong initial node 
> (binpacking)")
>                                     ^
> pkg/scheduler/objects/nodesorting_test.go:215:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node1.NodeID, nodes[1].NodeID, "wrong second node 
> (binpacking)")
>                                     ^
> pkg/scheduler/objects/nodesorting_test.go:244:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node1.NodeID, nodes[0].NodeID, "wrong initial node 
> (binpacking, empty allocation)")
>                                     ^
> pkg/scheduler/objects/nodesorting_test.go:245:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node2.NodeID, nodes[1].NodeID, "wrong second node 
> (binpacking, empty allocation)")
>                                     ^
> pkg/scheduler/objects/nodesorting_test.go:256:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node1.NodeID, nodes[0].NodeID, "wrong initial node 
> (fair, empty allocation)")
>                                     ^
> pkg/scheduler/objects/nodesorting_test.go:257:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node2.NodeID, nodes[1].NodeID, "wrong second node 
> (fair, empty allocation)")
>                                     ^
> pkg/scheduler/objects/nodesorting_test.go:274:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node2.NodeID, nodes[0].NodeID, "wrong initial node 
> (binpacking, node2 half-filled)")
>                                     ^
> pkg/scheduler/objects/nodesorting_test.go:275:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node1.NodeID, nodes[1].NodeID, "wrong second node 
> (binpacking, node2 half-filled")
>                                     ^
> pkg/scheduler/objects/nodesorting_test.go:287:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node1.NodeID, nodes[0].NodeID, "wrong initial node 
> (fair, node2 half-filled)")
>                                     ^
> pkg/scheduler/objects/nodesorting_test.go:288:32: G602: Potentially accessing 
> slice out of bounds (gosec)
>       assert.Equal(t, node2.NodeID, nodes[1].NodeID, "wrong second node 
> (binpacking, node2 half-filled")
>                                     ^
> make: *** [Makefile:131: lint] Error 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@yunikorn.apache.org
For additional commands, e-mail: dev-h...@yunikorn.apache.org

Reply via email to