[ https://issues.apache.org/jira/browse/YUNIKORN-2183?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
TingYao Huang updated YUNIKORN-2183: ------------------------------------ Target Version: 1.6.0 (was: 1.5.0) > core: fix goconst linter issues > -------------------------------- > > Key: YUNIKORN-2183 > URL: https://issues.apache.org/jira/browse/YUNIKORN-2183 > Project: Apache YuniKorn > Issue Type: Improvement > Components: core - common > Reporter: Wilfred Spiegelenburg > Assignee: Chen, Kai-Chun > Priority: Major > Labels: newbie > > Fix existing goconst linter issues: > {code:java} > pkg/common/security/usergroup_test_resolver.go:43:17: string `testuser1` has > 5 occurrences, make it a constant (goconst) > if userName == "testuser1" { > ^ > pkg/common/security/usergroup_test_resolver.go:51:17: string `testuser2` has > 3 occurrences, make it a constant (goconst) > if userName == "testuser2" { > ^ > pkg/scheduler/placement/fixed_rule_test.go:141:14: string `root.testparent` > has 3 occurrences, make it a constant (goconst) > if queue != "root.testparent" || err != nil { > ^ > pkg/scheduler/placement/filter.go:97:30: string `deny` has 9 occurrences, > make it a constant (goconst) > filter.allow = conf.Type != "deny" > ^ > pkg/scheduler/placement/placement_test.go:127:43: string `test` has 3 > occurrences, make it a constant (goconst) > if parent == nil || parent.getName() != "test" { > ^ > pkg/scheduler/placement/fixed_rule_test.go:63:10: string ` > partitions: > - name: default > queues: > - name: testqueue > - name: testparent > queues: > - name: testchild > ` has 3 occurrences, make it a constant (goconst) > data := ` > ^ > pkg/scheduler/placement/fixed_rule_test.go:110:14: string > `root.testparent.testchild` has 7 occurrences, make it a constant (goconst) > if queue != "root.testparent.testchild" || err != nil { > ^ > pkg/scheduler/placement/filter_test.go:31:14: string `allow` has 10 > occurrences, make it a constant (goconst) > conf.Type = "allow" > ^ > pkg/scheduler/placement/filter_test.go:278:17: string `user1` has 4 > occurrences, make it a constant (goconst) > userObj.User = "user1" > ^ > pkg/webservice/handlers_test.go:669:13: string `node-1` has 4 occurrences, > but such constant `nodeID` already exists (goconst) > node1ID := "node-1" > ^ > pkg/webservice/handlers_test.go:671:13: string `node-2` has 4 occurrences, > make it a constant (goconst) > node2ID := "node-2" > ^ > pkg/scheduler/tests/smoke_test.go:620:14: string `root.leaf` has 3 > occurrences, make it a constant (goconst) > leafName := "root.leaf" > ^ > pkg/scheduler/tests/reservation_test.go:98:15: string `root.leaf-1` has 5 > occurrences, make it a constant (goconst) > queueName := "root.leaf-1" > ^ > pkg/scheduler/tests/smoke_test.go:168:14: string `root.singleleaf` has 3 > occurrences, but such constant `leafName` already exists (goconst) > leafName := "root.singleleaf" > ^ {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@yunikorn.apache.org For additional commands, e-mail: issues-h...@yunikorn.apache.org