Skip to content

Commit 3b7e108

Browse files
Merge pull request #750 from metal3-io-bot/cherry-pick-749-to-release-1.8
🌱 bump Go to 1.23.3 and golangci-lint to 1.60.3
2 parents c324ae6 + 0d8c73a commit 3b7e108

File tree

6 files changed

+18
-21
lines changed

6 files changed

+18
-21
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: golangci-lint
22

33
on:
44
pull_request:
5-
types: [opened, edited, synchronize, reopened]
5+
types: [ opened, edited, synchronize, reopened ]
66

77
permissions: {}
88

@@ -30,5 +30,6 @@ jobs:
3030
- name: golangci-lint-${{matrix.working-directory}}
3131
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
3232
with:
33-
version: v1.56.2
33+
version: v1.60.3
3434
working-directory: ${{matrix.working-directory}}
35+
args: --timeout=15m

.golangci.yaml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
run:
2-
deadline: 5m
3-
skip-dirs:
4-
- mock*
5-
skip-files:
6-
- "zz_generated.*\\.go$"
7-
- ".*conversion.*\\.go$"
2+
go: "1.23"
3+
deadline: 10m
84
linters:
95
disable-all: true
106
enable:
117
- asciicheck
128
- bodyclose
9+
- copyloopvar
1310
- dogsled
1411
- errcheck
1512
- errorlint
16-
- exportloopref
1713
- goconst
1814
- gocritic
1915
- godot
@@ -45,7 +41,7 @@ linters:
4541

4642
linters-settings:
4743
gosec:
48-
go: "1.22"
44+
go: "1.23"
4945
severity: medium
5046
confidence: medium
5147
concurrency: 8
@@ -75,10 +71,6 @@ linters-settings:
7571
allow-unused: false
7672
allow-leading-space: false
7773
require-specific: true
78-
staticcheck:
79-
go: "1.22"
80-
stylecheck:
81-
go: "1.22"
8274
gocritic:
8375
enabled-tags:
8476
- experimental
@@ -97,8 +89,13 @@ linters-settings:
9789
- whyNoLint
9890
- wrapperFunc
9991
unused:
100-
go: "1.22"
92+
go: "1.23"
10193
issues:
94+
skip-dirs:
95+
- mock*
96+
skip-files:
97+
- "zz_generated.*\\.go$"
98+
- ".*conversion.*\\.go$"
10299
exclude-rules:
103100
- path: _test\.go
104101
linters:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# Support FROM override
16-
ARG BUILD_IMAGE=docker.io/golang:1.22.9@sha256:97ccb917d1dfe5b12cb4cfea1fb37989b28d3a87d28e89f27a71336c4700a87f
16+
ARG BUILD_IMAGE=docker.io/golang:1.23.3@sha256:d56c3e08fe5b27729ee3834854ae8f7015af48fd651cd25d1e3bcf3c19830174
1717
ARG BASE_IMAGE=gcr.io/distroless/static:nonroot@sha256:9ecc53c269509f63c69a266168e4a687c7eb8c0cfd753bd8bfcaa4f58a90876f
1818

1919
# Build the manager binary on golang image

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ SHELL:=/usr/bin/env bash
2020

2121
.DEFAULT_GOAL:=help
2222

23-
GO_VERSION ?= 1.22.9
23+
GO_VERSION ?= 1.23.3
2424
# Use GOPROXY environment variable if set
2525
GOPROXY := $(shell go env GOPROXY)
2626
ifeq ($(GOPROXY),)

hack/ensure-golangci-lint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ download_and_install_golangci_lint()
6060
KERNEL_OS="$(uname | tr '[:upper:]' '[:lower:]')"
6161
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')"
6262
GOLANGCI_LINT="golangci-lint"
63-
GOLANGCI_VERSION="1.56.2"
63+
GOLANGCI_VERSION="1.60.3"
6464
case "${KERNEL_OS}-${ARCH}" in
65-
darwin-arm64) GOLANGCI_SHA256="5f9ecda712c7ae08fbf872336fae3db866720e5865903d4c53903184b2a2c2dc" ;;
66-
linux-amd64) GOLANGCI_SHA256="e1c313fb5fc85a33890fdee5dbb1777d1f5829c84d655a47a55688f3aad5e501" ;;
65+
darwin-arm64) GOLANGCI_SHA256="deb0fbd0b99992d97808614db1214f57d5bdc12b907581e2ef10d3a392aca11f" ;;
66+
linux-amd64) GOLANGCI_SHA256="4037af8122871f401ed874852a471e54f147ff8ce80f5a304e020503bdb806ef" ;;
6767
*)
6868
echo >&2 "error:${KERNEL_OS}-${ARCH} not supported. Please obtain the binary and calculate sha256 manually."
6969
exit 1

ipam/ippool_manager.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ func (m *IPPoolManager) UpdateAddresses(ctx context.Context) (int, error) {
189189

190190
// Iterate over the IPClaim objects to find all addresses and objects
191191
for _, addressClaim := range addressClaimObjects.Items {
192-
addressClaim := addressClaim
193192
// If IPPool does not point to this object, discard
194193
if addressClaim.Spec.Pool.Name != m.IPPool.Name {
195194
continue

0 commit comments

Comments
 (0)