Skip to content

Commit

Permalink
Update golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
9seconds committed Mar 19, 2022
1 parent 5df1f59 commit 1575b82
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .golangci.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)'"
Expand Down
4 changes: 2 additions & 2 deletions mtglib/internal/obfuscated2/server_handshake_fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})

Expand All @@ -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)
Expand Down

0 comments on commit 1575b82

Please sign in to comment.