From 1575b82688d7d4390dc162633bd9ccbec49d3897 Mon Sep 17 00:00:00 2001 From: 9seconds Date: Sat, 19 Mar 2022 13:46:57 +0300 Subject: [PATCH] Update golangci-lint --- .github/workflows/ci.yaml | 11 ++++++++--- .golangci.toml | 2 +- Makefile | 2 +- .../obfuscated2/server_handshake_fuzz_test.go | 4 ++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7521d3e..27fa54e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -111,10 +111,15 @@ jobs: with: submodules: recursive - - name: Run linter - uses: golangci/golangci-lint-action@v2 + - name: Setup Go + uses: actions/setup-go@v2 with: - version: v1.44.2 + go-version: ^1.18 + + - name: Run linter + uses: golangci/golangci-lint-action@v3 + with: + version: v1.45.0 docker: name: Docker diff --git a/.golangci.toml b/.golangci.toml index 353b1d9..a595c75 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 cefbd34..7533f8e 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 fb5df81..d129f37 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)