diff --git a/.golangci.yml b/.golangci.yml index 68e4a90a6..543ae5948 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -74,7 +74,6 @@ linters: - zerologlint # not needed (related to zerolog package) # important to have - gofmt # important to prevent "format tsunami" ("gofmt -s -w" missed), disabled due to "https://github.com/golangci/golangci-lint-action/issues/535" - - makezero # very important (find/reduce bugs, e.g. in robot_work_test.go) - nakedret # very useful together with "nonamedreturns" (reduce bugs) - nonamedreturns # very useful (reduce bugs) - unconvert # very useful (reduce bugs, simplify code) diff --git a/robot_work_test.go b/robot_work_test.go index 761dd28c6..36ed3b4bd 100644 --- a/robot_work_test.go +++ b/robot_work_test.go @@ -94,8 +94,10 @@ func TestRobotAutomationFunctions(t *testing.T) { func collectStringKeysFromWorkRegistry(rwr *RobotWorkRegistry) []string { keys := make([]string, len(rwr.r)) - for k := range rwr.r { - keys = append(keys, k) + var idx int + for key := range rwr.r { + keys[idx] = key + idx++ } return keys }