Skip to content

Commit a028064

Browse files
authored
Merge pull request #9007 from Roasbeef/go-1-22
build: set min build version to Go 1.22.6
2 parents b4693b2 + 3ae6553 commit a028064

32 files changed

+483
-481
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ env:
3131
# /dev.Dockerfile
3232
# /make/builder.Dockerfile
3333
# /.github/workflows/release.yml
34-
GO_VERSION: 1.22.5
34+
GO_VERSION: 1.22.6
3535

3636
jobs:
3737
########################

.github/workflows/release.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ defaults:
1111

1212
env:
1313
# If you change this value, please change it in the following files as well:
14-
# /.travis.yml
1514
# /Dockerfile
1615
# /dev.Dockerfile
1716
# /make/builder.Dockerfile
1817
# /.github/workflows/main.yml
19-
GO_VERSION: 1.22.5
18+
GO_VERSION: 1.22.6
2019

2120
jobs:
2221
main:

.golangci.yml

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
run:
2-
# timeout for analysis
3-
deadline: 10m
2+
go: "1.22.6"
43

5-
# Skip autogenerated files for mobile and gRPC as well as copied code for
6-
# internal use.
7-
skip-files:
8-
- "mobile\\/.*generated\\.go"
9-
- "\\.pb\\.go$"
10-
- "\\.pb\\.gw\\.go$"
11-
- "internal\\/musig2v040"
12-
13-
skip-dirs:
14-
- channeldb/migration_01_to_11
15-
- channeldb/migration/lnwire21
4+
# Abort after 10 minutes.
5+
timeout: 10m
166

177
build-tags:
188
- autopilotrpc
@@ -57,7 +47,6 @@ linters-settings:
5747
- G306 # Poor file permissions used when writing to a new file.
5848

5949
staticcheck:
60-
go: "1.22.5"
6150
checks: ["-SA1019"]
6251

6352
lll:
@@ -131,25 +120,15 @@ linters:
131120
- gochecknoinits
132121

133122
# Deprecated linters. See https://golangci-lint.run/usage/linters/.
134-
- interfacer
135-
- golint
136-
- maligned
137-
- scopelint
138-
- exhaustivestruct
139123
- bodyclose
140124
- contextcheck
141125
- nilerr
142126
- noctx
143127
- rowserrcheck
144128
- sqlclosecheck
145-
- structcheck
146129
- tparallel
147130
- unparam
148131
- wastedassign
149-
- ifshort
150-
- varcheck
151-
- deadcode
152-
- nosnakecase
153132

154133

155134
# Disable gofumpt as it has weird behavior regarding formatting multiple
@@ -189,7 +168,7 @@ linters:
189168
- wrapcheck
190169

191170
# Allow dynamic errors.
192-
- goerr113
171+
- err113
193172

194173
# We use ErrXXX instead.
195174
- errname
@@ -205,15 +184,41 @@ linters:
205184
# The linter is too aggressive and doesn't add much value since reviewers
206185
# will also catch magic numbers that make sense to extract.
207186
- gomnd
187+
- mnd
208188

209-
# Some of the tests cannot be parallelized. On the other hand, we don't
210-
# gain much performance with this check so we disable it for now until
211-
# unit tests become our CI bottleneck.
189+
# Some of the tests cannot be parallelized. On the other hand, we don't
190+
# gain much performance with this check so we disable it for now until
191+
# unit tests become our CI bottleneck.
212192
- paralleltest
213193

194+
# New linters that we haven't had time to address yet.
195+
- testifylint
196+
- perfsprint
197+
- inamedparam
198+
- copyloopvar
199+
- tagalign
200+
- protogetter
201+
- revive
202+
- depguard
203+
- gosmopolitan
204+
- intrange
205+
206+
214207
issues:
215208
# Only show newly introduced problems.
216-
new-from-rev: 8c66353e4c02329abdacb5a8df29998035ec2e24
209+
new-from-rev: 77c7f776d5cbf9e147edc81d65ae5ba177a684e5
210+
211+
# Skip autogenerated files for mobile and gRPC as well as copied code for
212+
# internal use.
213+
skip-files:
214+
- "mobile\\/.*generated\\.go"
215+
- "\\.pb\\.go$"
216+
- "\\.pb\\.gw\\.go$"
217+
- "internal\\/musig2v040"
218+
219+
skip-dirs:
220+
- channeldb/migration_01_to_11
221+
- channeldb/migration/lnwire21
217222

218223
exclude-rules:
219224
# Exclude gosec from running for tests so that tests with weak randomness

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# /make/builder.Dockerfile
44
# /.github/workflows/main.yml
55
# /.github/workflows/release.yml
6-
FROM golang:1.22.5-alpine as builder
6+
FROM golang:1.22.6-alpine as builder
77

88
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
99
# queries required to connect to linked containers succeed.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ endif
3535
# GO_VERSION is the Go version used for the release build, docker files, and
3636
# GitHub Actions. This is the reference version for the project. All other Go
3737
# versions are checked against this version.
38-
GO_VERSION = 1.22.5
38+
GO_VERSION = 1.22.6
3939

4040
GOBUILD := $(LOOPVARFIX) go build -v
4141
GOINSTALL := $(LOOPVARFIX) go install -v

channeldb/graph_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2382,7 +2382,7 @@ func TestStressTestChannelGraphAPI(t *testing.T) {
23822382
methodsMu.Unlock()
23832383

23842384
err := fn()
2385-
require.NoErrorf(t, err, fmt.Sprintf(name))
2385+
require.NoErrorf(t, err, name)
23862386
}
23872387
})
23882388
}

contractcourt/channel_arbitrator.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1982,9 +1982,11 @@ func (c *ChannelArbitrator) isPreimageAvailable(hash lntypes.Hash) (bool,
19821982
// have the incoming contest resolver decide that we don't want to
19831983
// settle this invoice.
19841984
invoice, err := c.cfg.Registry.LookupInvoice(context.Background(), hash)
1985-
switch err {
1986-
case nil:
1987-
case invoices.ErrInvoiceNotFound, invoices.ErrNoInvoicesCreated:
1985+
switch {
1986+
case err == nil:
1987+
case errors.Is(err, invoices.ErrInvoiceNotFound) ||
1988+
errors.Is(err, invoices.ErrNoInvoicesCreated):
1989+
19881990
return false, nil
19891991
default:
19901992
return false, err

contractcourt/mock_htlcnotifier_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ type mockHTLCNotifier struct {
1010
}
1111

1212
func (m *mockHTLCNotifier) NotifyFinalHtlcEvent(key models.CircuitKey,
13-
info channeldb.FinalHtlcInfo) { //nolint:whitespace
13+
info channeldb.FinalHtlcInfo) {
14+
1415
}

dev.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# /make/builder.Dockerfile
44
# /.github/workflows/main.yml
55
# /.github/workflows/release.yml
6-
FROM golang:1.22.5-alpine as builder
6+
FROM golang:1.22.6-alpine as builder
77

88
LABEL maintainer="Olaoluwa Osuntokun <[email protected]>"
99

docker/btcd/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.22.5-alpine as builder
1+
FROM golang:1.22.6-alpine as builder
22

33
LABEL maintainer="Olaoluwa Osuntokun <[email protected]>"
44

0 commit comments

Comments
 (0)