Skip to content

Commit c93b68b

Browse files
committed
Migrate the golanci to version v2
Signed-off-by: Shiv Verma <shverma@redhat.com>
1 parent e711b9c commit c93b68b

2 files changed

Lines changed: 103 additions & 38 deletions

File tree

.golangci.bck.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
issues:
2+
exclude-dirs:
3+
- vendor
4+
run:
5+
build-tags:
6+
- e2e
7+
linters-settings:
8+
gocritic:
9+
disabled-checks:
10+
- unlambda
11+
gofumpt:
12+
extra-rules: true
13+
linters:
14+
enable:
15+
- asciicheck
16+
- bodyclose
17+
- dogsled
18+
- durationcheck
19+
- exhaustive
20+
- exportloopref
21+
- forbidigo
22+
- forcetypeassert
23+
- gochecknoinits
24+
- dupl
25+
- errcheck
26+
- errorlint
27+
- gofumpt
28+
- goimports
29+
- gosec
30+
- gocritic
31+
- misspell
32+
- gosec
33+
- gosimple
34+
- govet
35+
- importas
36+
- makezero
37+
- nakedret
38+
- predeclared
39+
- revive
40+
- staticcheck
41+
- stylecheck
42+
- unused
43+
- unparam
44+
- gochecknoinits
45+
# - goconst
46+
# - gocyclo
47+
# - goerr113
48+
# - gofmt
49+
- goheader
50+
- gomodguard
51+
- goprintffuncname
52+
- nilerr
53+
- noctx
54+
# - nolintlint (gofumpt conflict with it, create space all the time so :shrug:)
55+
- prealloc
56+
- promlinter
57+
# - rowserrcheck
58+
# - sqlclosecheck
59+
- tparallel
60+
#- unconvert
61+
# - wastedassign
62+
- whitespace

.golangci.yml

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,65 @@
1-
issues:
2-
exclude-dirs:
3-
- vendor
1+
version: "2"
42
run:
53
build-tags:
64
- e2e
7-
linters-settings:
8-
gocritic:
9-
disabled-checks:
10-
- unlambda
11-
gofumpt:
12-
extra-rules: true
135
linters:
146
enable:
157
- asciicheck
168
- bodyclose
179
- dogsled
10+
- dupl
1811
- durationcheck
12+
- errorlint
1913
- exhaustive
20-
- exportloopref
2114
- forbidigo
2215
- forcetypeassert
2316
- gochecknoinits
24-
- dupl
25-
- errcheck
26-
- errorlint
27-
- gofumpt
28-
- goimports
29-
- gosec
3017
- gocritic
31-
- misspell
18+
- goheader
19+
- gomodguard
20+
- goprintffuncname
3221
- gosec
33-
- gosimple
34-
- govet
3522
- importas
3623
- makezero
24+
- misspell
3725
- nakedret
38-
- predeclared
39-
- revive
40-
- staticcheck
41-
- stylecheck
42-
- unused
43-
- unparam
44-
- gochecknoinits
45-
# - goconst
46-
# - gocyclo
47-
# - goerr113
48-
# - gofmt
49-
- goheader
50-
- gomodguard
51-
- goprintffuncname
5226
- nilerr
5327
- noctx
54-
# - nolintlint (gofumpt conflict with it, create space all the time so :shrug:)
5528
- prealloc
29+
- predeclared
5630
- promlinter
57-
# - rowserrcheck
58-
# - sqlclosecheck
31+
- revive
32+
- staticcheck
5933
- tparallel
60-
#- unconvert
61-
# - wastedassign
34+
- unparam
6235
- whitespace
36+
settings:
37+
gocritic:
38+
disabled-checks:
39+
- unlambda
40+
exclusions:
41+
generated: lax
42+
presets:
43+
- comments
44+
- common-false-positives
45+
- legacy
46+
- std-error-handling
47+
paths:
48+
- vendor
49+
- third_party$
50+
- builtin$
51+
- examples$
52+
formatters:
53+
enable:
54+
- gofumpt
55+
- goimports
56+
settings:
57+
gofumpt:
58+
extra-rules: true
59+
exclusions:
60+
generated: lax
61+
paths:
62+
- vendor
63+
- third_party$
64+
- builtin$
65+
- examples$

0 commit comments

Comments
 (0)