Skip to content

Commit 0c68cfc

Browse files
committed
chore: update linter and dependencies
1 parent 36e0d14 commit 0c68cfc

5 files changed

Lines changed: 69 additions & 68 deletions

File tree

.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: 49 additions & 51 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,8 +11,7 @@ linters:
5911
- durationcheck
6012
- errcheck
6113
- errname
62-
# - errorlint # TODO can be used in future. Required to check the current reported issues.
63-
- exportloopref
14+
# - errorlint # TODO can be used in future. Required to check the current reported issues.
6415
- forbidigo
6516
- forcetypeassert
6617
- funlen
@@ -100,14 +51,58 @@ linters:
10051
- tagliatelle
10152
- tenv
10253
- thelper
103-
- typecheck
10454
- unconvert
10555
- unparam
10656
- unused
10757
- usestdlibvars
10858
- wastedassign
10959
- whitespace
11060

61+
linters-settings:
62+
govet:
63+
enable-all: true
64+
disable:
65+
- fieldalignment
66+
gocyclo:
67+
min-complexity: 15
68+
goconst:
69+
min-len: 5
70+
min-occurrences: 3
71+
misspell:
72+
locale: US
73+
funlen:
74+
lines: -1
75+
statements: 40
76+
godox:
77+
keywords:
78+
- FIXME
79+
gofumpt:
80+
extra-rules: false
81+
depguard:
82+
rules:
83+
main:
84+
deny:
85+
- pkg: "github.com/instana/testify"
86+
desc: not allowed
87+
- pkg: "github.com/sirupsen/logrus"
88+
desc: not allowed
89+
- pkg: "github.com/pkg/errors"
90+
desc: Should be replaced by standard lib errors package
91+
gocritic:
92+
enabled-tags:
93+
- diagnostic
94+
- style
95+
- performance
96+
disabled-checks:
97+
- unnamedResult
98+
- sloppyReassign
99+
- rangeValCopy
100+
- octalLiteral
101+
- paramTypeCombine # already handle by gofumpt.extra-rules
102+
settings:
103+
hugeParam:
104+
sizeThreshold: 100
105+
111106
issues:
112107
exclude-use-default: false
113108
max-issues-per-linter: 0
@@ -118,3 +113,6 @@ issues:
118113
linters:
119114
- goconst
120115
- funlen
116+
117+
run:
118+
timeout: 5m

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ test-start-stack:
2020
## Clean local data
2121
.PHONY: clean
2222
clean:
23-
docker-compose -f script/docker-compose.yml down
23+
docker-compose -f script/docker-compose.yml down --remove-orphans
2424
$(RM) goverage.report $(shell find . -type f -name *.out)

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
module github.com/kvtools/etcdv2
22

3-
go 1.19
3+
go 1.22.0
44

55
require (
66
github.com/kvtools/valkeyrie v1.0.0
7-
github.com/stretchr/testify v1.9.0
8-
go.etcd.io/etcd/client/v2 v2.305.9
7+
github.com/stretchr/testify v1.10.0
8+
go.etcd.io/etcd/client/v2 v2.305.17
99
)
1010

1111
require (
1212
github.com/coreos/go-semver v0.3.1 // indirect
1313
github.com/davecgh/go-spew v1.1.1 // indirect
1414
github.com/json-iterator/go v1.1.12 // indirect
1515
github.com/kr/text v0.2.0 // indirect
16-
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
16+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
1717
github.com/modern-go/reflect2 v1.0.2 // indirect
1818
github.com/pmezard/go-difflib v1.0.0 // indirect
19-
go.etcd.io/etcd/api/v3 v3.5.9 // indirect
20-
go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
19+
go.etcd.io/etcd/api/v3 v3.5.17 // indirect
20+
go.etcd.io/etcd/client/pkg/v3 v3.5.17 // indirect
2121
gopkg.in/yaml.v3 v3.0.1 // indirect
2222
)

go.sum

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,30 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
88
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
99
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
1010
github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs=
11+
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
1112
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
1213
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
1314
github.com/kvtools/valkeyrie v1.0.0 h1:LAITop2wPoYCMitR24GZZsW0b57hmI+ePD18VRTtOf0=
1415
github.com/kvtools/valkeyrie v1.0.0/go.mod h1:bDi/OdhJCSbGPMsCgUQl881yuEweKCSItAtTBI+ZjpU=
15-
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
1616
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
17+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
18+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
1719
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
1820
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
1921
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2022
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2123
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
2224
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
23-
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
24-
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
25-
go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs=
26-
go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k=
27-
go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE=
28-
go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4=
29-
go.etcd.io/etcd/client/v2 v2.305.9 h1:YZ2OLi0OvR0H75AcgSUajjd5uqKDKocQUqROTG11jIo=
30-
go.etcd.io/etcd/client/v2 v2.305.9/go.mod h1:0NBdNx9wbxtEQLwAQtrDHwx58m02vXpDcgSYI2seohQ=
25+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
26+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
27+
go.etcd.io/etcd/api/v3 v3.5.17 h1:cQB8eb8bxwuxOilBpMJAEo8fAONyrdXTHUNcMd8yT1w=
28+
go.etcd.io/etcd/api/v3 v3.5.17/go.mod h1:d1hvkRuXkts6PmaYk2Vrgqbv7H4ADfAKhyJqHNLJCB4=
29+
go.etcd.io/etcd/client/pkg/v3 v3.5.17 h1:XxnDXAWq2pnxqx76ljWwiQ9jylbpC4rvkAeRVOUKKVw=
30+
go.etcd.io/etcd/client/pkg/v3 v3.5.17/go.mod h1:4DqK1TKacp/86nJk4FLQqo6Mn2vvQFBmruW3pP14H/w=
31+
go.etcd.io/etcd/client/v2 v2.305.17 h1:ajFukQfI//xY5VuSeuUw4TJ4WnNR2kAFfV/P0pDdPMs=
32+
go.etcd.io/etcd/client/v2 v2.305.17/go.mod h1:EttKgEgvwikmXN+b7pkEWxDZr6sEaYsqCiS3k4fa/Vg=
3133
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
3234
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
35+
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
3336
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
3437
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 commit comments

Comments
 (0)