Skip to content

Commit

Permalink
Merge pull request #126 from jgiannuzzi/fix-linter
Browse files Browse the repository at this point in the history
Upgrade `golangci-lint` to 1.61.0
  • Loading branch information
k8s-ci-robot authored Nov 11, 2024
2 parents 7f60212 + 4626cc6 commit 6816492
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
go-version: # Note: Go only supports 2 versions: https://go.dev/doc/devel/release#policy
- "1.20"
- "1.23"

steps:
- uses: actions/checkout@v3
Expand All @@ -51,7 +51,7 @@ jobs:
strategy:
matrix:
go-version: # Note: Go only supports 2 versions: https://go.dev/doc/devel/release#policy
- "1.20"
- "1.23"

steps:
- uses: actions/checkout@v3
Expand All @@ -67,9 +67,9 @@ jobs:
strategy:
matrix:
go-version: # Note: Go only supports 2 versions: https://go.dev/doc/devel/release#policy
- "1.20"
- "1.23"
tinygo-version: # Note: TinyGo only supports latest: https://github.com/tinygo-org/tinygo/releases
- "0.28.1" # Latest
- "0.34.0" # Latest

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testdata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
strategy:
matrix:
go-version: # Note: Go only supports 2 versions: https://go.dev/doc/devel/release#policy
- "1.20"
- "1.23"
tinygo-version: # Note: TinyGo only supports latest: https://github.com/tinygo-org/tinygo/releases
- "0.28.1" # Latest
- "0.34.0" # Latest

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
gofumpt := mvdan.cc/[email protected]
gosimports := github.com/rinchsan/gosimports/cmd/[email protected]
golangci_lint := github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.2
golangci_lint := github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0

examples/advanced/main.wasm: examples/advanced/main.go
@(cd $(@D); tinygo build -o main.wasm -gc=custom -tags=custommalloc -scheduler=none --no-debug -target=wasi .)
Expand Down Expand Up @@ -33,7 +33,7 @@ bench-guest: guest/.tinygo-target.json
# This makes a wasi target that uses the same wazero version as the scheduler.
wazero_version := $(shell (cd scheduler; go list -f '{{ .Module.Version }}' github.com/tetratelabs/wazero))
guest/.tinygo-target.json: scheduler/go.mod
@sed 's~"wasmtime.*"~"go run github.com/tetratelabs/wazero/cmd/wazero@$(wazero_version) run {}"~' $(shell tinygo env TINYGOROOT)/targets/wasi.json > $@
@jq '."emulator" = "go run github.com/tetratelabs/wazero/cmd/wazero@$(wazero_version) run {}"' $(shell tinygo env TINYGOROOT)/targets/wasi.json > $@

.PHONY: build-wat
build-wat: $(wildcard scheduler/test/testdata/*/*.wat)
Expand Down
5 changes: 2 additions & 3 deletions scheduler/test/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package test
import (
"context"
"errors"
"fmt"

v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
Expand All @@ -23,9 +22,9 @@ type FakeRecorder struct {
func (f *FakeRecorder) Eventf(regarding runtime.Object, related runtime.Object, eventtype, reason, action, note string, args ...interface{}) {
obj, ok := regarding.(*v1.ObjectReference)
if !ok || obj.Name == "" {
f.EventMsg = fmt.Sprintf(eventtype + " " + reason + " " + action + " " + note)
f.EventMsg = eventtype + " " + reason + " " + action + " " + note
} else {
f.EventMsg = fmt.Sprintf(obj.Name + " " + eventtype + " " + reason + " " + action + " " + note)
f.EventMsg = obj.Name + " " + eventtype + " " + reason + " " + action + " " + note
}
}

Expand Down

0 comments on commit 6816492

Please sign in to comment.