Skip to content

Commit 0b41754

Browse files
authored
chore(deps): upgrade golangci-lint (#83)
1 parent a75ee0a commit 0b41754

File tree

4 files changed

+32
-33
lines changed

4 files changed

+32
-33
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
cache: false
2525

2626
- name: Run Linter
27-
uses: golangci/golangci-lint-action@v6
27+
uses: golangci/golangci-lint-action@v7
2828

2929
- name: Check spelling
3030
uses: crate-ci/typos@master

.golangci.yml

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,44 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
allow-parallel-runners: true
4-
5-
issues:
6-
# don't skip warning about doc comments
7-
# don't exclude the default set of lint
8-
exclude-use-default: false
9-
# restore some of the defaults
10-
# (fill in the rest as needed)
11-
exclude-rules:
12-
- path: "api/*"
13-
linters:
14-
- lll
15-
- path: "internal/*"
16-
linters:
17-
- dupl
18-
- lll
194
linters:
205
enable:
216
- copyloopvar
227
- dupl
23-
- errcheck
248
- ginkgolinter
259
- goconst
2610
- gocyclo
27-
- gofmt
28-
- goimports
29-
- gosimple
30-
- govet
31-
- ineffassign
3211
- misspell
3312
- nakedret
3413
- prealloc
3514
- revive
36-
- staticcheck
37-
- typecheck
3815
- unconvert
3916
- unparam
40-
- unused
41-
42-
linters-settings:
43-
revive:
17+
settings:
18+
revive:
19+
rules:
20+
- name: comment-spacings
21+
exclusions:
22+
generated: lax
4423
rules:
45-
- name: comment-spacings
24+
- linters:
25+
- lll
26+
path: api/*
27+
- linters:
28+
- dupl
29+
- lll
30+
path: internal/*
31+
paths:
32+
- third_party$
33+
- builtin$
34+
- examples$
35+
formatters:
36+
enable:
37+
- gofmt
38+
- goimports
39+
exclusions:
40+
generated: lax
41+
paths:
42+
- third_party$
43+
- builtin$
44+
- examples$

internal/controller/metalstackcluster_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var _ = Describe("MetalStackCluster Controller", func() {
7070

7171
Context("without owning cluster resource", func() {
7272
BeforeEach(func() {
73-
resource.ObjectMeta.OwnerReferences = nil
73+
resource.OwnerReferences = nil
7474
})
7575

7676
It("should skip reconciles", func() {

test/utils/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"os/exec"
2525
"strings"
2626

27-
. "github.com/onsi/ginkgo/v2" //nolint:golint,revive
27+
. "github.com/onsi/ginkgo/v2" //nolint:golint,staticcheck
2828
)
2929

3030
const (
@@ -197,7 +197,7 @@ func GetProjectDir() (string, error) {
197197
if err != nil {
198198
return wd, err
199199
}
200-
wd = strings.Replace(wd, "/test/e2e", "", -1)
200+
wd = strings.ReplaceAll(wd, "/test/e2e", "")
201201
return wd, nil
202202
}
203203

0 commit comments

Comments
 (0)