From 600b7276e0a79d92cb430998fa780cb40445e969 Mon Sep 17 00:00:00 2001 From: Vladimir Dementyev Date: Fri, 4 Oct 2024 20:00:40 -0700 Subject: [PATCH] style: upgrade golangcilint --- .github/workflows/lint.yml | 20 ++++++++++---------- .golangci.yml | 18 ++++++++---------- Makefile | 2 +- rpc/rpc.go | 2 +- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5a14570d..91c087a1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,19 +3,19 @@ name: Lint on: push: branches: - - master + - master pull_request: jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v4 - with: - go-version-file: go.mod - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.55.2 - args: --timeout 3m + - uses: actions/checkout@v4 + - uses: actions/setup-go@v4 + with: + go-version-file: go.mod + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.61.0 + args: --timeout 3m diff --git a/.golangci.yml b/.golangci.yml index 0bd916c5..19d41b4c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,12 +1,11 @@ # See: https://golangci-lint.run/usage/linters/ -run: - skip-dirs: +issues: + exclude-dirs: - "tmp" + - "vendor" linters: - disable: - - structcheck enable: - decorder - errname @@ -21,17 +20,16 @@ linters: - unconvert linters-settings: - gci: - local-prefixes: github.com/evilmartians/redis-proxy - govet: - check-shadowing: true enable-all: true - disable: fieldalignment + disable: + - fieldalignment gosec: severity: medium - confedence: medium + confidence: medium + excludes: + - G115 stylecheck: checks: ["all", "-ST1005", "-ST1003"] diff --git a/Makefile b/Makefile index c51ca37d..b386576c 100644 --- a/Makefile +++ b/Makefile @@ -202,7 +202,7 @@ gen-ssl: bin/golangci-lint: @test -x $$(go env GOPATH)/bin/golangci-lint || \ - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.55.2 + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.61.0 lint: bin/golangci-lint $$(go env GOPATH)/bin/golangci-lint run diff --git a/rpc/rpc.go b/rpc/rpc.go index 92010297..c7b8c167 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -554,7 +554,7 @@ func defaultDialer(conf *Config, l *slog.Logger) (pb.RPCClient, ClientHelper, er dialOptions = append(dialOptions, grpc.WithDefaultCallOptions(callOptions...)) } - conn, err := grpc.Dial( + conn, err := grpc.NewClient( host, dialOptions..., )