Update golangci-lint

This commit is contained in:
9seconds
2022-03-19 14:45:58 +03:00
parent 5df1f594cc
commit 1575b82688
4 changed files with 12 additions and 7 deletions
+8 -3
View File
@@ -111,10 +111,15 @@ jobs:
with: with:
submodules: recursive submodules: recursive
- name: Run linter - name: Setup Go
uses: golangci/golangci-lint-action@v2 uses: actions/setup-go@v2
with: with:
version: v1.44.2 go-version: ^1.18
- name: Run linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.0
docker: docker:
name: Docker name: Docker
+1 -1
View File
@@ -9,4 +9,4 @@ format = "colored-line-number"
[linters] [linters]
enable-all = true enable-all = true
disable = ["ireturn", "varnamelen", "gochecknoglobals", "gas", "goerr113", "exhaustivestruct", "containedctx"] disable = ["thelper", "ireturn", "varnamelen", "gochecknoglobals", "gas", "goerr113", "exhaustivestruct", "containedctx"]
+1 -1
View File
@@ -2,7 +2,7 @@ ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
IMAGE_NAME := mtg IMAGE_NAME := mtg
APP_NAME := $(IMAGE_NAME) 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) 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)'" COMMON_BUILD_FLAGS := -trimpath -mod=readonly -ldflags="-extldflags '-static' -s -w -X 'main.version=$(VERSION)'"
@@ -19,7 +19,7 @@ func FuzzServerSend(f *testing.F) {
Once(). Once().
Run(func(args mock.Arguments) { Run(func(args mock.Arguments) {
message := make([]byte, len(data)) 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) assert.Equal(t, message, data)
}) })
@@ -45,7 +45,7 @@ func FuzzServerReceive(f *testing.F) {
Run(func(args mock.Arguments) { Run(func(args mock.Arguments) {
message := make([]byte, len(data)) message := make([]byte, len(data))
handshakeData.encryptor.XORKeyStream(message, 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) n, err := handshakeData.proxyConn.Read(buffer)