Skip to content

Commit bca0c35

Browse files
chore: bump golangci-lint to v2 and golang to v1.25.1 (#508)
* chore: bump golangci-lint to v2 * chore: bump golang to 1.25.1 * chore: gofumpt
1 parent bc61ed8 commit bca0c35

89 files changed

Lines changed: 247 additions & 235 deletions

Some content is hidden

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

.github/workflows/go.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ jobs:
1111
os: [ubuntu-latest, macos-latest, windows-latest]
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v5
1515
with:
1616
fetch-depth: 1
1717
- name: Setup Go
1818
if: matrix.os == 'ubuntu-latest'
19-
uses: actions/setup-go@v5
19+
uses: actions/setup-go@v6
2020
with:
2121
cache: false
2222
go-version-file: go.mod
2323
- name: Setup Go
2424
if: matrix.os == 'macos-latest' || matrix.os == 'windows-latest'
25-
uses: actions/setup-go@v5
25+
uses: actions/setup-go@v6
2626
with:
2727
cache: true
2828
go-version-file: go.mod
@@ -32,9 +32,9 @@ jobs:
3232
run: git config --global core.autocrlf false
3333
- name: Lint
3434
if: matrix.os == 'ubuntu-latest'
35-
uses: golangci/golangci-lint-action@v6
35+
uses: golangci/golangci-lint-action@v8
3636
with:
37-
version: v1.64.5
37+
version: v2.5.0
3838
args: --timeout 10m
3939
skip-cache: false
4040
- name: Vet

.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: Run GoReleaser

.golangci.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
1-
run:
2-
timeout: 10m
1+
version: "2"
32
linters:
43
enable:
54
- copyloopvar
6-
- errcheck
75
- errname
86
- errorlint
97
- goconst
10-
- gofmt
11-
- gofumpt
12-
- govet
138
- misspell
149
- nilerr
15-
- staticcheck
1610
- unconvert
17-
- unused
11+
exclusions:
12+
generated: lax
13+
presets:
14+
- comments
15+
- common-false-positives
16+
- legacy
17+
- std-error-handling
18+
paths:
19+
- third_party$
20+
- builtin$
21+
- examples$
22+
formatters:
23+
enable:
24+
- gofmt
25+
- gofumpt
26+
exclusions:
27+
generated: lax
28+
paths:
29+
- third_party$
30+
- builtin$
31+
- examples$

.goreleaser.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ builds:
2222

2323
goarch:
2424
- amd64
25-
- 386
25+
- "386"
2626
- arm64
2727
- arm
2828

2929
ignore:
3030
- goos: darwin
31-
goarch: 386
31+
goarch: "386"
3232
- goos: darwin
3333
goarch: arm
3434
- goos: windows

Dockerfile

Lines changed: 2 additions & 2 deletions
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
@@ -8,7 +8,7 @@ COPY . ./
88

99
RUN make binary
1010

11-
FROM debian:12.10-slim
11+
FROM debian:12.12-slim
1212

1313
ENV DEBIAN_FRONTEND=noninteractive
1414

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GO ?= go
22
GOLANGCI_LINT ?= golangci-lint
3-
GOLANGCI_LINT_VERSION ?= v1.64.5
3+
GOLANGCI_LINT_VERSION ?= v2.5.0
44
COMMIT ?= "$(shell git describe --long --dirty --always --match "" || true)"
55
VERSION ?= "$(shell git describe --tags --abbrev=0 | cut -c2-)"
66
LDFLAGS ?= -s -w \

cmd/beekeeper/cmd/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ func (c *command) setSwapClient() (err error) {
449449
c.swapClient = &swap.NotSet{}
450450
}
451451

452-
return
452+
return err
453453
}
454454

455455
func newLogger(cmd *cobra.Command, verbosity, lokiEndpoint string, httpClient *http.Client) (logging.Logger, error) {

cmd/beekeeper/cmd/create_k8s_namespace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func (c *command) initCreateK8sNamespace() *cobra.Command {
2828
}
2929

3030
c.log.Infof("namespace %s created", name)
31-
return
31+
return err
3232
},
3333
PreRunE: func(cmd *cobra.Command, args []string) error {
3434
if err := c.setK8sClient(); err != nil {

cmd/beekeeper/cmd/delete_k8s_namespace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (c *command) initDeleteK8SNamespace() *cobra.Command {
2626
}
2727

2828
c.log.Infof("namespace %s deleted", name)
29-
return
29+
return err
3030
},
3131
PreRunE: func(cmd *cobra.Command, args []string) error {
3232
if err := c.setK8sClient(); err != nil {

cmd/beekeeper/cmd/print.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Requires exactly one argument from the list above.`,
4646
if err := c.config.PrintYaml(os.Stdout); err != nil {
4747
return fmt.Errorf("config can not be printed: %s", err.Error())
4848
}
49-
return
49+
return err
5050
}
5151

5252
ctx, cancel := context.WithTimeout(cmd.Context(), c.globalConfig.GetDuration(optionNameTimeout))
@@ -67,7 +67,7 @@ Requires exactly one argument from the list above.`,
6767
PreRunE: func(cmd *cobra.Command, args []string) (err error) {
6868
// skip setup in case of print config
6969
if args[0] == "config" {
70-
return
70+
return err
7171
}
7272
return c.preRunE(cmd, args)
7373
},
@@ -100,7 +100,7 @@ var printFuncs = map[string]func(ctx context.Context, cluster orchestration.Clus
100100
}
101101
}
102102

103-
return
103+
return err
104104
},
105105
"depths": func(ctx context.Context, cluster orchestration.Cluster) (err error) {
106106
topologies, err := cluster.Topologies(ctx)
@@ -115,7 +115,7 @@ var printFuncs = map[string]func(ctx context.Context, cluster orchestration.Clus
115115
}
116116
}
117117

118-
return
118+
return err
119119
},
120120
"nodes": func(ctx context.Context, cluster orchestration.Cluster) (err error) {
121121
nodes := cluster.NodeNames()
@@ -124,7 +124,7 @@ var printFuncs = map[string]func(ctx context.Context, cluster orchestration.Clus
124124
fmt.Printf("%s\n", n)
125125
}
126126

127-
return
127+
return err
128128
},
129129
"overlays": func(ctx context.Context, cluster orchestration.Cluster) (err error) {
130130
overlays, err := cluster.Overlays(ctx)
@@ -139,7 +139,7 @@ var printFuncs = map[string]func(ctx context.Context, cluster orchestration.Clus
139139
}
140140
}
141141

142-
return
142+
return err
143143
},
144144
"peers": func(ctx context.Context, cluster orchestration.Cluster) (err error) {
145145
peers, err := cluster.Peers(ctx)
@@ -155,7 +155,7 @@ var printFuncs = map[string]func(ctx context.Context, cluster orchestration.Clus
155155
}
156156
}
157157
}
158-
return
158+
return err
159159
},
160160
"topologies": func(ctx context.Context, cluster orchestration.Cluster) (err error) {
161161
topologies, err := cluster.Topologies(ctx)
@@ -177,11 +177,11 @@ var printFuncs = map[string]func(ctx context.Context, cluster orchestration.Clus
177177
}
178178
}
179179

180-
return
180+
return err
181181
},
182182
// print config prints configuration used to setup cluster
183183
// add it to print funcs and do nothing (required to check if argument exists)
184184
"config": func(ctx context.Context, cluster orchestration.Cluster) (err error) {
185-
return
185+
return err
186186
},
187187
}

0 commit comments

Comments
 (0)