1
+ version : " 2"
1
2
linters :
2
- disable-all : true
3
+ default : none
3
4
# Enable specific linter
4
5
# https://golangci-lint.run/usage/linters/#enabled-by-default-linters
5
6
enable :
6
- # Default linters
7
- - errcheck
8
- - gosimple
9
- - govet
10
- - ineffassign
11
- - staticcheck
12
- - typecheck
13
- - unused
14
- # Additional linters
15
7
- asciicheck
16
8
- bidichk
17
9
- bodyclose
@@ -20,10 +12,11 @@ linters:
20
12
- dogsled
21
13
- dupl
22
14
- durationcheck
15
+ - err113
16
+ - errcheck
23
17
- errname
24
18
- errorlint
25
19
- exhaustive
26
- - exportloopref
27
20
- forcetypeassert
28
21
- funlen
29
22
- gochecknoglobals
@@ -32,13 +25,12 @@ linters:
32
25
- gocritic
33
26
- gocyclo
34
27
- godot
35
- - goerr113
36
- - gofmt
37
28
- goheader
38
- - goimports
39
29
- goprintffuncname
40
30
- gosec
31
+ - govet
41
32
- importas
33
+ - ineffassign
42
34
- makezero
43
35
- misspell
44
36
- nakedret
@@ -51,66 +43,81 @@ linters:
51
43
- prealloc
52
44
- predeclared
53
45
- revive
54
- - stylecheck
46
+ - staticcheck
55
47
- tagliatelle
56
- - tenv
57
48
- unconvert
58
49
- unparam
50
+ - unused
59
51
- wastedassign
60
52
- whitespace
61
53
- wrapcheck
62
54
- wsl
63
- linters- settings :
64
- goheader :
65
- values :
66
- regexp :
67
- license-year : (202[5-9]|20[3-9][0-9])
68
- template : |-
69
- Copyright {{license-year}} The Kubernetes Authors.
55
+ settings :
56
+ goheader :
57
+ values :
58
+ regexp :
59
+ license-year : (202[5-9]|20[3-9][0-9])
60
+ template : |-
61
+ Copyright {{license-year}} The Kubernetes Authors.
70
62
71
- Licensed under the Apache License, Version 2.0 (the "License");
72
- you may not use this file except in compliance with the License.
73
- You may obtain a copy of the License at
63
+ Licensed under the Apache License, Version 2.0 (the "License");
64
+ you may not use this file except in compliance with the License.
65
+ You may obtain a copy of the License at
74
66
75
- http://www.apache.org/licenses/LICENSE-2.0
67
+ http://www.apache.org/licenses/LICENSE-2.0
76
68
77
- Unless required by applicable law or agreed to in writing, software
78
- distributed under the License is distributed on an "AS IS" BASIS,
79
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
80
- See the License for the specific language governing permissions and
81
- limitations under the License.
82
- nlreturn :
83
- block-size : 2
84
- revive :
85
- confidence : 0
86
- rules :
87
- - name : exported
88
- severity : warning
89
- disabled : false
90
- arguments :
91
- - " checkPrivateReceivers"
92
- - " disableStutteringCheck"
93
- stylecheck :
94
- # https://staticcheck.io/docs/options#checks
95
- checks : ["all", "-ST1000"]
96
- dot-import-whitelist :
97
- - " github.com/onsi/ginkgo/v2"
98
- - " github.com/onsi/gomega"
99
- issues :
100
- exclude :
101
- - Analyzer is a global variable
102
- exclude-use-default : false
103
- exclude-rules :
104
- # Exclude some linters from running on tests files.
105
- - path : _test\.go
106
- linters :
107
- - gocyclo
108
- - dupl
109
- - gosec
110
- - gochecknoglobals
111
- - goerr113
112
- - funlen
113
- - path : testdata
114
- linters :
69
+ Unless required by applicable law or agreed to in writing, software
70
+ distributed under the License is distributed on an "AS IS" BASIS,
71
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
72
+ See the License for the specific language governing permissions and
73
+ limitations under the License.
74
+ nlreturn :
75
+ block-size : 2
76
+ revive :
77
+ confidence : 0
78
+ rules :
79
+ - name : exported
80
+ arguments :
81
+ - checkPrivateReceivers
82
+ - disableStutteringCheck
83
+ severity : warning
84
+ disabled : false
85
+ staticcheck :
86
+ # https://staticcheck.io/docs/options#checks
87
+ checks :
115
88
- all
116
-
89
+ - -ST1000
90
+ dot-import-whitelist :
91
+ - github.com/onsi/ginkgo/v2
92
+ - github.com/onsi/gomega
93
+ exclusions :
94
+ generated : lax
95
+ rules :
96
+ - linters :
97
+ - dupl
98
+ - err113
99
+ - funlen
100
+ - gochecknoglobals
101
+ - gocyclo
102
+ - gosec
103
+ # Exclude some linters from running on tests files.
104
+ path : _test\.go
105
+ - linters :
106
+ - all
107
+ path : testdata
108
+ - path : (.+)\.go$
109
+ text : Analyzer is a global variable
110
+ paths :
111
+ - third_party$
112
+ - builtin$
113
+ - examples$
114
+ formatters :
115
+ enable :
116
+ - gofmt
117
+ - goimports
118
+ exclusions :
119
+ generated : lax
120
+ paths :
121
+ - third_party$
122
+ - builtin$
123
+ - examples$
0 commit comments