diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7521d3ead..27fa54e73 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -111,10 +111,15 @@ jobs: with: submodules: recursive + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: ^1.18 + - name: Run linter - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: - version: v1.44.2 + version: v1.45.0 docker: name: Docker diff --git a/.golangci.toml b/.golangci.toml index 353b1d9da..a595c75e2 100644 --- a/.golangci.toml +++ b/.golangci.toml @@ -9,4 +9,4 @@ format = "colored-line-number" [linters] enable-all = true -disable = ["ireturn", "varnamelen", "gochecknoglobals", "gas", "goerr113", "exhaustivestruct", "containedctx"] +disable = ["thelper", "ireturn", "varnamelen", "gochecknoglobals", "gas", "goerr113", "exhaustivestruct", "containedctx"] diff --git a/Makefile b/Makefile index cefbd34c0..7533f8e30 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) IMAGE_NAME := mtg APP_NAME := $(IMAGE_NAME) -GOLANGCI_LINT_VERSION := v1.44.2 +GOLANGCI_LINT_VERSION := v1.45.0 VERSION := $(shell git describe --exact-match HEAD 2>/dev/null || git describe --tags --always) COMMON_BUILD_FLAGS := -trimpath -mod=readonly -ldflags="-extldflags '-static' -s -w -X 'main.version=$(VERSION)'" diff --git a/mtglib/internal/obfuscated2/server_handshake_fuzz_test.go b/mtglib/internal/obfuscated2/server_handshake_fuzz_test.go index fb5df8199..d129f3779 100644 --- a/mtglib/internal/obfuscated2/server_handshake_fuzz_test.go +++ b/mtglib/internal/obfuscated2/server_handshake_fuzz_test.go @@ -19,7 +19,7 @@ func FuzzServerSend(f *testing.F) { Once(). Run(func(args mock.Arguments) { message := make([]byte, len(data)) - handshakeData.decryptor.XORKeyStream(message, args.Get(0).([]byte)) + handshakeData.decryptor.XORKeyStream(message, args.Get(0).([]byte)) // nolint: forcetypeassert assert.Equal(t, message, data) }) @@ -45,7 +45,7 @@ func FuzzServerReceive(f *testing.F) { Run(func(args mock.Arguments) { message := make([]byte, len(data)) handshakeData.encryptor.XORKeyStream(message, data) - copy(args.Get(0).([]byte), message) + copy(args.Get(0).([]byte), message) // nolint: forcetypeassert }) n, err := handshakeData.proxyConn.Read(buffer)