Skip to content

Commit 92cd161

Browse files
Merge pull request #28 from NETWAYS/dependabot/github_actions/golangci/golangci-lint-action-7
Bump golangci/golangci-lint-action from 6 to 7
2 parents fac7560 + 10880d7 commit 92cd161

File tree

6 files changed

+62
-52
lines changed

6 files changed

+62
-52
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- uses: actions/checkout@v4
1717

1818
- name: golangci-lint
19-
uses: golangci/golangci-lint-action@v6
19+
uses: golangci/golangci-lint-action@v7
2020
with:
21-
version: v1.54
21+
version: v2.0.2

.golangci.yml

Lines changed: 55 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,58 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
tests: false
4-
skip-files:
5-
- 'testhelper/for_main.go'
6-
issues:
7-
exclude-rules:
8-
- path: 'result/overall.go'
9-
linters:
10-
- nestif
11-
- path: 'convert/bytes_common.go'
12-
linters:
13-
- ireturn
14-
- path: 'CheckCommandArgument.go'
15-
linters:
16-
- goconst
174
linters:
18-
enable-all: true
19-
disable:
20-
- cyclop
21-
- depguard
22-
- exhaustivestruct
23-
- exhaustruct
24-
- forbidigo
25-
- forcetypeassert
26-
- gci
27-
- gochecknoglobals
28-
- gochecknoinits
29-
- godox
30-
- godot
31-
- goerr113
32-
- gofumpt
33-
- gomnd
34-
- lll
35-
- musttag
36-
- nakedret
37-
- nlreturn
38-
- nolintlint
39-
- nonamedreturns
40-
- tagliatelle
41-
- varnamelen
42-
- wrapcheck
43-
linters-settings:
44-
estif:
45-
min-complexity: 4
46-
maligned:
47-
suggest-new: true
48-
funlen:
49-
ignore-comments: true
50-
lines: 75
5+
default: all
6+
disable:
7+
- funlen
8+
- cyclop
9+
- depguard
10+
- err113
11+
- exhaustruct
12+
- forbidigo
13+
- forcetypeassert
14+
- gochecknoglobals
15+
- gochecknoinits
16+
- godot
17+
- godox
18+
- lll
19+
- mnd
20+
- musttag
21+
- nakedret
22+
- nlreturn
23+
- nolintlint
24+
- nonamedreturns
25+
- tagliatelle
26+
- varnamelen
27+
- wrapcheck
28+
exclusions:
29+
generated: lax
30+
presets:
31+
- comments
32+
- common-false-positives
33+
- legacy
34+
- std-error-handling
35+
rules:
36+
- linters:
37+
- nestif
38+
path: result/overall.go
39+
- linters:
40+
- ireturn
41+
path: convert/bytes_common.go
42+
- linters:
43+
- goconst
44+
path: CheckCommandArgument.go
45+
paths:
46+
- third_party$
47+
- builtin$
48+
- examples$
49+
formatters:
50+
enable:
51+
- gofmt
52+
- goimports
53+
exclusions:
54+
generated: lax
55+
paths:
56+
- third_party$
57+
- builtin$
58+
- examples$

CheckCommand.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func (cc *CheckCommand) String() string {
3030
bla.WriteString(indentString() + "command = " + cc.Command.String() + "\n")
3131

3232
bla.WriteString(indentString() + "arguments = {\n")
33+
3334
indentation++
3435

3536
for i := range cc.Arguments {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/NETWAYS/go-icingadsl
22

3-
go 1.21
3+
go 1.22

types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,10 @@ func (ia *Array) String() string {
106106
b.WriteString("[")
107107

108108
if len(*ia) > 1 {
109-
for i := 0; i < len(*ia)-1; i++ {
109+
for i := range len(*ia) - 1 {
110110
b.WriteString((*ia)[i].String() + ", ")
111111
}
112+
112113
b.WriteString((*ia)[len(*ia)-1].String())
113114
} else if len(*ia) == 1 {
114115
b.WriteString((*ia)[0].String())

types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"time"
66
)
77

8-
func assertEqualString(t *testing.T, actual, expected string) {
8+
func assertEqualString(t *testing.T, expected, actual string) {
99
if actual != expected {
1010
t.Error("\nActual: ", actual, "\nExpected: ", expected)
1111
}

0 commit comments

Comments
 (0)