Skip to content

Commit 16d1f6b

Browse files
committed
feat(Makefile): update golangci-lint 1.56.2->1.63.4
1 parent d8430e2 commit 16d1f6b

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

.golangci.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ run:
33
linters:
44
enable:
55
- bodyclose
6+
- copyloopvar
67
- dogsled
78
- dupl
89
- durationcheck
9-
- exportloopref
1010
- exhaustive
1111
- gochecknoinits
1212
- goconst
1313
- gocritic
1414
- gofmt
1515
- goimports
16-
- gomnd
1716
- gosec
1817
- govet
1918
- lll
2019
- misspell
20+
- mnd
2121
- nakedret
2222
- noctx
2323
- nolintlint
@@ -35,24 +35,24 @@ issues:
3535
# Excluding single digits from magic number detector because it produces too many obvious results (like klog)
3636
- text: "Magic number: [0-9]{1},"
3737
linters:
38-
- gomnd
38+
- mnd
3939
# Exclude file masks from magic number detector because these numbers are obvious
4040
- text: "Magic number: 0[0-7]{3},"
4141
linters:
42-
- gomnd
42+
- mnd
4343
# Exlude IP masks netmasks as substituting them for constants only makes these less obvious
4444
- text: "Magic number: 255,"
4545
linters:
46-
- gomnd
46+
- mnd
4747
path: pkg/controllers/proxy/network_services_controller.go
4848
# Exclude IP netmasks from magic number detector because these numbers are obvious
4949
- text: "Magic number: 32,"
5050
linters:
51-
- gomnd
51+
- mnd
5252
# Exclude decimal bases from magic number detector because these numbers are obvious
5353
- text: "Magic number: 10,"
5454
linters:
55-
- gomnd
55+
- mnd
5656
# Exclude file mask security findings as we are always intentional about the file masks we use
5757
- text: "G306:"
5858
linters:
@@ -70,6 +70,7 @@ issues:
7070
# always show all issues of a type rather than showing 3
7171
max-same-issues: 0
7272
output:
73-
format: tab
73+
formats:
74+
- format: tab
7475
print-issued-lines: true
7576
print-linter-name: true

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ BUILDTIME_BASE?=$(DOCKER_BUILD_IMAGE)
2626
# Do not bump past Alpine 3.18 until upstream netfilter problems in iptables v1.8.10 are resolved. See:
2727
# https://github.com/cloudnativelabs/kube-router/issues/1676
2828
RUNTIME_BASE?=alpine:3.21
29-
DOCKER_LINT_IMAGE?=golangci/golangci-lint:v1.56.2
29+
DOCKER_LINT_IMAGE?=golangci/golangci-lint:v1.63.4
3030
DOCKER_MARKDOWNLINT_IMAGE?=tmknom/markdownlint:0.39.0
3131
GOBGP_VERSION=v3.29.0
3232
QEMU_IMAGE?=multiarch/qemu-user-static

pkg/controllers/lballoc/lballoc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (lbc *LoadBalancerController) runLeaderElection(ctx context.Context, isLead
155155
leaderelection.RunOrDie(ctx, leaderelection.LeaderElectionConfig{
156156
Lock: lbc.lock,
157157
ReleaseOnCancel: true,
158-
LeaseDuration: 15 * time.Second, //nolint:gomnd // No reason for a 15 second constant
158+
LeaseDuration: 15 * time.Second, //nolint:mnd // No reason for a 15 second constant
159159
RenewDeadline: 10 * time.Second,
160160
RetryPeriod: 2 * time.Second,
161161
Callbacks: leaderelection.LeaderCallbacks{

pkg/options/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ type KubeRouterConfig struct {
8989
}
9090

9191
func NewKubeRouterConfig() *KubeRouterConfig {
92-
//nolint:gomnd // Here we are specifying the names of the literals which is very similar to constant behavior
92+
//nolint:mnd // Here we are specifying the names of the literals which is very similar to constant behavior
9393
return &KubeRouterConfig{
9494
BGPGracefulRestartDeferralTime: 360 * time.Second,
9595
BGPGracefulRestartTime: 90 * time.Second,

pkg/utils/linux_routingtest.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ func NewFakeLocalLinkQuerier(addrStrings []string, mtus []int) *FakeLocalLinkQue
3232
ip := net.ParseIP(addr)
3333
var netMask net.IPMask
3434
if ip.To4() != nil {
35-
//nolint:gomnd // Hardcoded value is used for testing purposes
35+
//nolint:mnd // Hardcoded value is used for testing purposes
3636
netMask = net.CIDRMask(24, 32)
3737
} else {
38-
//nolint:gomnd // Hardcoded value is used for testing purposes
38+
//nolint:mnd // Hardcoded value is used for testing purposes
3939
netMask = net.CIDRMask(64, 128)
4040
}
4141
ipNet := &net.IPNet{

0 commit comments

Comments
 (0)