Skip to content

Commit 8ba36d2

Browse files
author
Lorenz Kästle
committed
Migrate golangci-lint to v2
1 parent 21af883 commit 8ba36d2

File tree

3 files changed

+50
-110
lines changed

3 files changed

+50
-110
lines changed

.github/workflows/golangci-lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
- name: golangci-lint
1818
uses: golangci/golangci-lint-action@v7
1919
with:
20-
version: v1.61
20+
version: v2.0.2

.golangci.yml

+49-42
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,52 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
tests: false
4-
issues:
5-
exclude-rules:
6-
- path: 'internal/client/client.go'
7-
linters:
8-
- dupl
9-
# - path: 'cmd/root.go'
10-
# linters:
11-
# - exhaustive
124
linters:
13-
enable-all: true
14-
disable:
15-
- cyclop
16-
- depguard
17-
- exhaustivestruct
18-
- exhaustruct
19-
- forbidigo
20-
- forcetypeassert
21-
- gci
22-
- gochecknoglobals
23-
- gochecknoinits
24-
- godox
25-
- godot
26-
- goerr113
27-
- gofumpt
28-
- gomnd
29-
- mnd
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
44-
funlen:
45-
lines: 90
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+
- dupl
38+
path: internal/client/client.go
39+
paths:
40+
- third_party$
41+
- builtin$
42+
- examples$
43+
formatters:
44+
enable:
45+
- gofmt
46+
- goimports
47+
exclusions:
48+
generated: lax
49+
paths:
50+
- third_party$
51+
- builtin$
52+
- examples$

contrib/icinga2-notification-example.conf

-67
This file was deleted.

0 commit comments

Comments
 (0)