Skip to content

Commit 1a4f351

Browse files
chore: bump golang to v1.25.1 and golangci-lint to v2 (#5231)
1 parent 0856b6a commit 1a4f351

File tree

45 files changed

+179
-170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+179
-170
lines changed

.github/workflows/beekeeper.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ jobs:
3333
msg: ${{ steps.commit.outputs.msg }}
3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@v5
3737
if: github.event.action != 'beekeeper'
3838
with:
3939
fetch-depth: 0
4040
- name: Checkout
41-
uses: actions/checkout@v4
41+
uses: actions/checkout@v5
4242
if: github.event.action == 'beekeeper'
4343
with:
4444
fetch-depth: 0
4545
ref: ${{ github.event.client_payload.ref }}
4646
- name: Setup Go
47-
uses: actions/setup-go@v5
47+
uses: actions/setup-go@v6
4848
with:
4949
cache: false
5050
go-version-file: go.mod

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v4
43+
uses: actions/checkout@v5
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v5
1818
with:
1919
fetch-depth: '0'
2020
- name: Check whether docs have changed

.github/workflows/go.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ jobs:
2121
os: [ubuntu-latest, macos-latest, windows-latest]
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v5
2525
- name: Setup Go
26-
uses: actions/setup-go@v5
26+
uses: actions/setup-go@v6
2727
with:
2828
cache: true
2929
go-version-file: go.mod
@@ -41,9 +41,9 @@ jobs:
4141
continue-on-error: ${{ github.ref == 'refs/heads/master' }}
4242
steps:
4343
- name: Checkout
44-
uses: actions/checkout@v4
44+
uses: actions/checkout@v5
4545
- name: Setup Go
46-
uses: actions/setup-go@v5
46+
uses: actions/setup-go@v6
4747
with:
4848
cache: true
4949
go-version-file: go.mod
@@ -55,22 +55,22 @@ jobs:
5555
runs-on: ubuntu-latest
5656
steps:
5757
- name: Checkout
58-
uses: actions/checkout@v4
58+
uses: actions/checkout@v5
5959
with:
6060
fetch-depth: 0
6161
- name: Setup Go
62-
uses: actions/setup-go@v5
62+
uses: actions/setup-go@v6
6363
with:
6464
cache: false
6565
go-version-file: go.mod
6666
- name: Commit linting
6767
if: github.ref != 'refs/heads/master'
6868
uses: wagoid/commitlint-github-action@v5
6969
- name: GolangCI-Lint
70-
uses: golangci/golangci-lint-action@v6
70+
uses: golangci/golangci-lint-action@v8
7171
with:
7272
skip-cache: false
73-
version: v1.64.5
73+
version: v2.5.0
7474
- name: Whitespace check
7575
run: make check-whitespace
7676
- name: go mod tidy check
@@ -81,9 +81,9 @@ jobs:
8181
runs-on: ubuntu-latest
8282
steps:
8383
- name: Checkout
84-
uses: actions/checkout@v4
84+
uses: actions/checkout@v5
8585
- name: Setup Go
86-
uses: actions/setup-go@v5
86+
uses: actions/setup-go@v6
8787
with:
8888
cache: false
8989
go-version-file: go.mod
@@ -109,11 +109,11 @@ jobs:
109109
if: github.ref == 'refs/heads/master'
110110
steps:
111111
- name: Checkout
112-
uses: actions/checkout@v4
112+
uses: actions/checkout@v5
113113
with:
114114
fetch-depth: 0
115115
- name: Setup Go
116-
uses: actions/setup-go@v5
116+
uses: actions/setup-go@v6
117117
with:
118118
cache: false
119119
go-version-file: go.mod

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616
with:
1717
fetch-depth: 0
1818
- name: Setup Go
19-
uses: actions/setup-go@v5
19+
uses: actions/setup-go@v6
2020
with:
2121
go-version-file: go.mod
2222
- name: Docker Hub and Quay Login

.golangci.yml

Lines changed: 57 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,81 @@
1-
run:
2-
timeout: 10m
1+
version: "2"
32
linters:
43
enable:
54
- asciicheck
65
- bidichk
76
- copyloopvar
87
- dogsled
98
- durationcheck
10-
- errcheck
119
- errname
1210
- errorlint
1311
- forbidigo
1412
- gochecknoinits
1513
- goconst
16-
- gofmt
1714
- goheader
1815
- goprintffuncname
19-
- gosimple
20-
- govet
2116
- importas
22-
- ineffassign
2317
- misspell
2418
- nilerr
2519
- noctx
2620
- paralleltest
2721
- prealloc
2822
- predeclared
2923
- promlinter
30-
- staticcheck
3124
- thelper
32-
- typecheck
3325
- unconvert
34-
- unused
35-
# - depguard disable temporary until this issue is resolved: https://github.com/golangci/golangci-lint/issues/3906
36-
37-
linters-settings:
38-
govet:
39-
enable-all: true
40-
disable:
41-
- fieldalignment ## temporally disabled
42-
- shadow ## temporally disabled
43-
goheader:
44-
values:
45-
regexp:
46-
date: "20[1-2][0-9]"
47-
template: |-
48-
Copyright {{date}} The Swarm Authors. All rights reserved.
49-
Use of this source code is governed by a BSD-style
50-
license that can be found in the LICENSE file.
51-
paralleltest:
52-
# Ignore missing calls to `t.Parallel()` and only report incorrect uses of `t.Parallel()`.
53-
ignore-missing: true
54-
issues:
55-
exclude-rules:
56-
- linters:
57-
- goheader
58-
text: "go-ethereum Authors" ## disable check for other authors
59-
- path: _test\.go
60-
linters:
61-
- goconst ## temporally disable goconst in test
62-
- linters:
63-
- forbidigo
64-
path: cmd/bee/cmd
65-
text: "use of `fmt.Print" ## allow fmt.Print in cmd directory
66-
- linters:
67-
- dogsled
68-
path: pkg/api/(.+)_test\.go # temporally disable dogsled in api test files
69-
- linters:
70-
- dogsled
71-
path: pkg/pushsync/(.+)_test\.go # temporally disable dogsled in pushsync test files
72-
# temporally disable paralleltest in following packages
73-
- linters:
74-
- paralleltest
75-
path: pkg/log
26+
settings:
27+
goheader:
28+
values:
29+
regexp:
30+
date: 20[1-2][0-9]
31+
template: |-
32+
Copyright {{date}} The Swarm Authors. All rights reserved.
33+
Use of this source code is governed by a BSD-style
34+
license that can be found in the LICENSE file.
35+
govet:
36+
disable:
37+
- fieldalignment
38+
- shadow
39+
enable-all: true
40+
paralleltest:
41+
ignore-missing: true
42+
exclusions:
43+
generated: lax
44+
presets:
45+
- comments
46+
- common-false-positives
47+
- legacy
48+
- std-error-handling
49+
rules:
50+
- linters:
51+
- goheader
52+
text: go-ethereum Authors
53+
- linters:
54+
- goconst
55+
path: _test\.go
56+
- linters:
57+
- forbidigo
58+
path: cmd/bee/cmd
59+
text: use of `fmt.Print
60+
- linters:
61+
- dogsled
62+
path: pkg/api/(.+)_test\.go
63+
- linters:
64+
- dogsled
65+
path: pkg/pushsync/(.+)_test\.go
66+
- linters:
67+
- paralleltest
68+
path: pkg/log
69+
paths:
70+
- third_party$
71+
- builtin$
72+
- examples$
73+
formatters:
74+
enable:
75+
- gofmt
76+
exclusions:
77+
generated: lax
78+
paths:
79+
- third_party$
80+
- builtin$
81+
- examples$

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.24 AS build
1+
FROM golang:1.25 AS build
22

33
WORKDIR /src
44
# enable modules caching in separate layer

Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.24 AS build
1+
FROM golang:1.25 AS build
22

33
ARG REACHABILITY_OVERRIDE_PUBLIC=false
44
ARG BATCHFACTOR_OVERRIDE_PUBLIC=5

Dockerfile.goreleaser

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:12.10-slim
1+
FROM debian:12.12-slim
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

Dockerfile.scratch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:12.10-slim
1+
FROM debian:12.12-slim
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

0 commit comments

Comments
 (0)