Skip to content

Commit d6fe6bd

Browse files
dependabot[bot]Lorenz Kästlemartialblog
authored
build(deps): bump golangci/golangci-lint-action from 6 to 7 (#128)
* build(deps): bump golangci/golangci-lint-action from 6 to 7 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6 to 7. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](golangci/golangci-lint-action@v6...v7) --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lorenz Kästle <[email protected]> Co-authored-by: Markus Opolka <[email protected]>
1 parent e176207 commit d6fe6bd

File tree

6 files changed

+59
-47
lines changed

6 files changed

+59
-47
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- name: golangci-lint
16-
uses: golangci/golangci-lint-action@v6
16+
uses: golangci/golangci-lint-action@v7
1717
with:
18-
version: v1.61
18+
version: v2.0.2

.golangci.yml

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

convert/bytes_common.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ func ParseBytes(value string) (ByteAny, error) {
2323
value = strings.TrimSpace(value)
2424

2525
// Split number and unit by first non-numeric rune
26-
firstNonNumeric := func(c rune) bool { return !(c >= '0' && c <= '9' || c == '.') }
26+
firstNonNumeric := func(c rune) bool { return !(c >= '0' && c <= '9' || c == '.') } //nolint: staticcheck
27+
2728
i := strings.IndexFunc(value, firstNonNumeric)
2829

2930
var unit string

perfdata/list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import (
99
type PerfdataList []*Perfdata
1010

1111
// String returns string representations of all Perfdata
12-
func (l PerfdataList) String() string {
12+
func (l *PerfdataList) String() string {
1313
var out strings.Builder
1414

15-
for _, p := range l {
15+
for _, p := range *l {
1616
pfDataString, err := p.ValidatedString()
1717

1818
// Ignore perfdata points which fail to format

perfdata/list_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func ExamplePerfdataList() {
1515
fmt.Println(list)
1616

1717
// Output:
18-
// test1=23 test2=42
18+
// [test1=23 test2=42]
1919
}
2020

2121
func TestPerfdataListFormating(t *testing.T) {

testhelper/for_main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func RunMainTest(f func(), args ...string) string {
1515
base := []string{"check_with_go_test"}
1616
origArgs := os.Args
1717

18-
os.Args = append(base, args...)
18+
os.Args = append(base, args...) //nolint: gocritic
1919
stdout := CaptureStdout(f)
2020
os.Args = origArgs
2121

0 commit comments

Comments
 (0)