Skip to content

Commit

Permalink
style: upgrade golangcilint
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Oct 5, 2024
1 parent 743904d commit 600b727
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 8 additions & 10 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...,
)
Expand Down

0 comments on commit 600b727

Please sign in to comment.