Skip to content

Commit d0ce6ed

Browse files
committed
chore: update linter and dependencies
1 parent 11dfcec commit d0ce6ed

File tree

5 files changed

+59
-57
lines changed

5 files changed

+59
-57
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build and test
33
on: [push, pull_request]
44

55
env:
6-
GOLANGCI_LINT_VERSION: v1.59.1
6+
GOLANGCI_LINT_VERSION: v1.63.4
77

88
jobs:
99
build:

.golangci.yml

Lines changed: 51 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,3 @@
1-
run:
2-
timeout: 5m
3-
4-
linters-settings:
5-
govet:
6-
enable-all: true
7-
disable:
8-
- fieldalignment
9-
gocyclo:
10-
min-complexity: 15
11-
goconst:
12-
min-len: 5
13-
min-occurrences: 3
14-
misspell:
15-
locale: US
16-
funlen:
17-
lines: -1
18-
statements: 40
19-
godox:
20-
keywords:
21-
- FIXME
22-
gofumpt:
23-
extra-rules: false
24-
depguard:
25-
rules:
26-
main:
27-
deny:
28-
- pkg: "github.com/instana/testify"
29-
desc: not allowed
30-
- pkg: "github.com/sirupsen/logrus"
31-
desc: not allowed
32-
- pkg: "github.com/pkg/errors"
33-
desc: Should be replaced by standard lib errors package
34-
gocritic:
35-
enabled-tags:
36-
- diagnostic
37-
- style
38-
- performance
39-
disabled-checks:
40-
- unnamedResult
41-
- sloppyReassign
42-
- rangeValCopy
43-
- octalLiteral
44-
- paramTypeCombine # already handle by gofumpt.extra-rules
45-
settings:
46-
hugeParam:
47-
sizeThreshold: 100
48-
491
linters:
502
disable-all: true
513
enable:
@@ -59,7 +11,6 @@ linters:
5911
- errcheck
6012
- errname
6113
- errorlint
62-
- exportloopref
6314
- forbidigo
6415
- forcetypeassert
6516
- funlen
@@ -99,14 +50,61 @@ linters:
9950
- tagliatelle
10051
- tenv
10152
- thelper
102-
- typecheck
10353
- unconvert
10454
- unparam
10555
- unused
10656
- usestdlibvars
10757
- wastedassign
10858
- whitespace
10959

60+
linters-settings:
61+
govet:
62+
enable-all: true
63+
disable:
64+
- fieldalignment
65+
gocyclo:
66+
min-complexity: 15
67+
goconst:
68+
min-len: 5
69+
min-occurrences: 3
70+
misspell:
71+
locale: US
72+
funlen:
73+
lines: -1
74+
statements: 40
75+
godox:
76+
keywords:
77+
- FIXME
78+
gofumpt:
79+
extra-rules: false
80+
depguard:
81+
rules:
82+
main:
83+
deny:
84+
- pkg: "github.com/instana/testify"
85+
desc: not allowed
86+
- pkg: "github.com/sirupsen/logrus"
87+
desc: not allowed
88+
- pkg: "github.com/pkg/errors"
89+
desc: Should be replaced by standard lib errors package
90+
gocritic:
91+
enabled-tags:
92+
- diagnostic
93+
- style
94+
- performance
95+
disabled-checks:
96+
- unnamedResult
97+
- sloppyReassign
98+
- rangeValCopy
99+
- octalLiteral
100+
- paramTypeCombine # already handle by gofumpt.extra-rules
101+
settings:
102+
hugeParam:
103+
sizeThreshold: 100
104+
gosec:
105+
excludes:
106+
- G115
107+
110108
issues:
111109
exclude-use-default: false
112110
max-issues-per-linter: 0
@@ -119,3 +117,6 @@ issues:
119117
- funlen
120118
- path: redis.go
121119
text: 'Function `NewClient->newConnPool->NewConnPool->reaper->checkMinIdleConns` should pass the context parameter'
120+
121+
run:
122+
timeout: 5m

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
m.PHONY: all
1+
.PHONY: all
22
all: validate test clean
33

44
## Run validates
@@ -25,6 +25,7 @@ test-start-stack:
2525
## Clean local data
2626
.PHONY: clean
2727
clean:
28-
docker-compose -f script/docker-compose.yml down
29-
docker-compose -f script/docker-compose-sentinel.yml down
28+
rm -f ./script/conf/sentinel1.conf ./script/conf/sentinel2.conf ./script/conf/sentinel3.conf
29+
docker-compose -f script/docker-compose.yml down --remove-orphans
30+
docker-compose -f script/docker-compose-sentinel.yml down --remove-orphans
3031
$(RM) goverage.report $(shell find . -type f -name *.out)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.19
55
require (
66
github.com/kvtools/valkeyrie v1.0.0
77
github.com/redis/go-redis/v9 v9.2.1
8-
github.com/stretchr/testify v1.9.0
8+
github.com/stretchr/testify v1.10.0
99
)
1010

1111
require (

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
1616
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
1717
github.com/redis/go-redis/v9 v9.2.1 h1:WlYJg71ODF0dVspZZCpYmoF1+U1Jjk9Rwd7pq6QmlCg=
1818
github.com/redis/go-redis/v9 v9.2.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
19-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
20-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
19+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
20+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
2121
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
2222
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
2323
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

0 commit comments

Comments
 (0)