diff --git a/Makefile b/Makefile index 6042228..ac95aba 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ run-image: ## run PBnJ container image # BEGIN: lint-install . # http://github.com/tinkerbell/lint-install -GOLINT_VERSION ?= v1.42.0 +GOLINT_VERSION ?= v1.50.1 HADOLINT_VERSION ?= v2.7.0 SHELLCHECK_VERSION ?= v0.7.2 LINT_OS := $(shell uname) diff --git a/grpc/oob/bmc/bmc.go b/grpc/oob/bmc/bmc.go index ec378a7..6d37aa5 100644 --- a/grpc/oob/bmc/bmc.go +++ b/grpc/oob/bmc/bmc.go @@ -141,7 +141,7 @@ func (m Action) setupConnection(ctx context.Context, user, password, host string for _, elem := range successfulConnections { conn := connections[elem] if r, ok := conn.(common.Connection); ok && elem == "bmclib" { - defer r.Close(ctx) // nolint:revive // defer in a loop is OK here, as loop length is limited + defer r.Close(ctx) //nolint:revive // defer in a loop is OK here, as loop length is limited } if r, ok := conn.(oob.BMC); ok { diff --git a/grpc/oob/common_test.go b/grpc/oob/common_test.go index 845642f..8de2d19 100644 --- a/grpc/oob/common_test.go +++ b/grpc/oob/common_test.go @@ -3,7 +3,6 @@ package oob import ( "context" "errors" - "fmt" "testing" "time" @@ -35,7 +34,7 @@ func TestParseAuth(t *testing.T) { if errMsg != nil { diff := cmp.Diff(tc.want.Error(), errMsg.Error()) if diff != "" { - t.Log(fmt.Sprintf("%+v", errMsg)) + t.Logf("%+v", errMsg) t.Fatalf(diff) } } diff --git a/grpc/rpc/bmc_test.go b/grpc/rpc/bmc_test.go index de73d83..5f009c5 100644 --- a/grpc/rpc/bmc_test.go +++ b/grpc/rpc/bmc_test.go @@ -4,7 +4,6 @@ import ( "context" "errors" "fmt" - "io/ioutil" "os" "os/exec" "testing" @@ -51,7 +50,7 @@ func setup() { } _, err := exec.LookPath("ipmitool") if err != nil { - err := ioutil.WriteFile(tempIPMITool, []byte{}, 0o777) + err := os.WriteFile(tempIPMITool, []byte{}, 0o777) if err != nil { fmt.Println("didnt find ipmitool in PATH and couldnt create one in /tmp") os.Exit(3) //nolint:revive // deep-exit here is OK diff --git a/grpc/taskrunner/taskrunner.go b/grpc/taskrunner/taskrunner.go index d790ddd..b14d347 100644 --- a/grpc/taskrunner/taskrunner.go +++ b/grpc/taskrunner/taskrunner.go @@ -93,7 +93,7 @@ func (r *Runner) worker(_ context.Context, logger logr.Logger, description, task select { case msg := <-messagesChan: currStatus, _ := repo.Get(taskID) - sessionRecord.Messages = append(currStatus.Messages, msg) // nolint:gocritic // apparently this is the right slice + sessionRecord.Messages = append(currStatus.Messages, msg) //nolint:gocritic // apparently this is the right slice _ = repo.Update(taskID, sessionRecord) case <-actionSyn: actionACK <- true diff --git a/test/runner/common.go b/test/runner/common.go index 94bd62c..bd1830b 100644 --- a/test/runner/common.go +++ b/test/runner/common.go @@ -1,7 +1,7 @@ package runner import ( - "io/ioutil" + "os" "gopkg.in/yaml.v2" ) @@ -40,7 +40,7 @@ type Resource struct { // Config for the resources file. func (c *ConfigFile) Config(name string) error { - config, err := ioutil.ReadFile(name) + config, err := os.ReadFile(name) if err != nil { return err }