Skip to content

Commit 88f7542

Browse files
committed
Bump golang and netlink versions
Signed-off-by: Ivan Kolodyazhny <e0ne@e0ne.info>
1 parent b7b9fac commit 88f7542

File tree

5 files changed

+23
-93
lines changed

5 files changed

+23
-93
lines changed

.github/workflows/static-scan.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
runs-on: ubuntu-22.04
77
steps:
88
- name: set up Go
9-
uses: actions/setup-go@v3
9+
uses: actions/setup-go@v4
1010
with:
11-
go-version: 1.20.x
11+
go-version: 1.23
1212
- name: checkout PR
1313
uses: actions/checkout@v2
1414
- name: run make lint

.golangci.yml

Lines changed: 8 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,20 @@
11
linters-settings:
2-
dupl:
3-
threshold: 150
4-
funlen:
5-
lines: 100
6-
statements: 50
7-
goconst:
8-
min-len: 2
9-
min-occurrences: 2
10-
gocritic:
11-
enabled-tags:
12-
- diagnostic
13-
- experimental
14-
- opinionated
15-
- performance
16-
- style
17-
disabled-checks:
18-
- dupImport # https://github.com/go-critic/go-critic/issues/845
19-
- ifElseChain
20-
- octalLiteral
21-
- whyNoLint
22-
- wrapperFunc
23-
- unnamedResult
24-
gocognit:
25-
min-complexity: 30
26-
goimports:
27-
local-prefixes: github.com/Mellanox/ib-sriov-cni
28-
gomnd:
29-
settings:
30-
mnd:
31-
# don't include the "operation" and "assign"
32-
checks: [argument,case,condition,return]
33-
govet:
34-
check-shadowing: true
35-
settings:
36-
printf:
37-
funcs:
38-
- (github.com/rs/zerolog/zerolog.Event).Msgf
39-
lll:
40-
line-length: 120
41-
misspell:
42-
locale: US
43-
prealloc:
44-
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
45-
# True by default.
46-
simple: true
47-
range-loops: true # Report preallocation suggestions on range loops, true by default
48-
for-loops: false # Report preallocation suggestions on for loops, false by default
49-
2+
revive:
3+
rules:
4+
- name: dot-imports
5+
arguments:
6+
- allowedPackages:
7+
- "github.com/onsi/ginkgo/v2"
8+
- "github.com/onsi/gomega"
509
linters:
5110
# please, do not use `enable-all`: it's deprecated and will be removed soon.
5211
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
5312
disable-all: true
5413
enable:
14+
- revive
5515
- bodyclose
56-
- depguard
57-
- dogsled
58-
- dupl
59-
- errcheck
60-
- exportloopref
61-
- funlen
62-
- gochecknoinits
63-
- goconst
64-
- gocritic
65-
- gocognit
66-
- gofmt
67-
- goimports
68-
- gomnd
69-
- goprintffuncname
7016
- gosec
71-
- gosimple
72-
- govet
73-
- ineffassign
74-
- lll
75-
- misspell
76-
- nakedret
77-
- prealloc
78-
- revive
79-
- staticcheck
80-
- stylecheck
81-
- typecheck
82-
- unconvert
83-
- unparam
84-
- unused
8517
- whitespace
86-
8718
issues:
8819
# Excluding configuration per-path, per-linter, per-text and per-source
8920
exclude-rules:

Makefile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,11 @@ $(BUILDDIR)/$(BINARY_NAME): $(GOFILES) | $(BUILDDIR)
5858

5959
# Tools
6060

61+
# Tools
6162
GOLANGCI_LINT = $(BINDIR)/golangci-lint
62-
# golangci-lint version should be updated periodically
63-
# we keep it fixed to avoid it from unexpectedly failing on the project
64-
# in case of a version bump
65-
GOLANGCI_LINT_VER = v1.51.2
66-
TIMEOUT = 15
67-
export GOLANGCI_LINT_CACHE = $(BUILDDIR)/.cache
68-
69-
$(GOLANGCI_LINT): | $(BINDIR) ; $(info installing golangci-lint...)
70-
$(call go-install-tool,$(GOLANGCI_LINT),github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VER))
63+
GOLANGCI_LINT_VERSION = v1.64.7
64+
$(GOLANGCI_LINT): | $(BINDIR) ; $(info Installing golangci-lint...)
65+
$Q GOBIN=$(BINDIR) $(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
7166

7267
GOVERALLS = $(BINDIR)/goveralls
7368
$(GOVERALLS): | $(BINDIR) ; $(info installing goveralls...)

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/k8snetworkplumbingwg/ib-sriov-cni
22

3-
go 1.20
3+
go 1.23.0
4+
5+
toolchain go1.23.4
46

57
require (
68
github.com/containernetworking/cni v1.1.2
@@ -11,7 +13,7 @@ require (
1113
github.com/onsi/ginkgo/v2 v2.19.0
1214
github.com/onsi/gomega v1.33.1
1315
github.com/stretchr/testify v1.8.4
14-
github.com/vishvananda/netlink v1.2.1-beta.2
16+
github.com/vishvananda/netlink v1.2.1-beta.2.0.20240221172127-ec7bcb248e94
1517
)
1618

1719
require (

go.sum

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W
166166
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
167167
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
168168
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
169+
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
169170
github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c=
170171
github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
171172
github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
@@ -197,8 +198,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
197198
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
198199
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
199200
github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE=
200-
github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs=
201-
github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho=
201+
github.com/vishvananda/netlink v1.2.1-beta.2.0.20240221172127-ec7bcb248e94 h1:EO+D8nUD4bAhHHcJUSvH+8puZrDrcjc50tePSevGQrw=
202+
github.com/vishvananda/netlink v1.2.1-beta.2.0.20240221172127-ec7bcb248e94/go.mod h1:whJevzBpTrid75eZy99s3DqCmy05NfibNaF2Ol5Ox5A=
202203
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
203204
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
204205
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
@@ -339,7 +340,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w
339340
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
340341
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
341342
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
342-
golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
343343
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
344344
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
345345
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -353,6 +353,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
353353
golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
354354
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
355355
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
356+
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
356357
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
357358
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
358359
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
@@ -514,6 +515,7 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
514515
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
515516
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
516517
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
518+
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
517519
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
518520
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
519521
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

0 commit comments

Comments
 (0)