1
1
linters :
2
- enable :
3
- - asciicheck
4
- - bidichk
5
- - bodyclose
6
- - containedctx
7
- - contextcheck
8
- # - cyclop
9
- - decorder
10
- - depguard
11
- - dogsled
12
- - dupl
13
- - durationcheck
14
- - errchkjson
15
- # - errname
16
- - errorlint
17
- # - exhaustive
18
- # - exhaustivestruct
19
- - exportloopref
20
- # - forbidigo
21
- - forcetypeassert
22
- # - funlen
23
- - gci
24
- # - gochecknoglobals
25
- # - gochecknoinits
26
- # - gocognit
27
- - goconst
28
- - gocritic
29
- - gocyclo
30
- # - godot
31
- # - godox
32
- - goerr113
33
- - gofmt
34
- # - gofumpt
35
- - goheader
36
- - goimports
37
- # - gomnd
38
- - gomoddirectives
39
- - gomodguard
40
- - goprintffuncname
41
- - gosec
42
- - grouper
43
- - ifshort
44
- - importas
45
- - ireturn
46
- # - lll
47
- - maintidx
48
- - makezero
49
- - misspell
50
- - nakedret
51
- # - nestif
52
- - nilerr
53
- # - nilnil
54
- # - nlreturn
55
- - noctx
56
- - nolintlint
57
- # - paralleltest
58
- - prealloc
59
- - predeclared
60
- - promlinter
61
- - revive
62
- - rowserrcheck
63
- - sqlclosecheck
64
- - stylecheck
65
- # - tagliatelle
66
- - tenv
67
- # - testpackage
68
- # - thelper
69
- # - tparallel
70
- - unconvert
71
- - unparam
72
- # - varnamelen
73
- - wastedassign
74
- - whitespace
75
- # - wrapcheck
76
- # - wsl
2
+ enable-all : true
3
+ disable :
4
+ - cyclop
5
+ - deadcode
6
+ - errname
7
+ - exhaustive
8
+ - exhaustruct
9
+ - exhaustivestruct
10
+ - forbidigo
11
+ - funlen
12
+ - gci
13
+ - gochecknoglobals
14
+ - gochecknoinits
15
+ - gocognit
16
+ - godot
17
+ - godox
18
+ - golint
19
+ - gofumpt
20
+ - gomnd
21
+ - ifshort
22
+ - interfacer
23
+ - lll
24
+ - maligned
25
+ - nestif
26
+ - nilnil
27
+ - nlreturn
28
+ - nosnakecase
29
+ - paralleltest
30
+ - scopelint
31
+ - structcheck
32
+ - tagliatelle
33
+ - testpackage
34
+ - thelper
35
+ - tparallel
36
+ - varcheck
37
+ - varnamelen
38
+ - wrapcheck
39
+ - wsl
77
40
78
41
linters-settings :
79
42
importas :
43
+ # Do not allow unaliased imports of aliased packages.
44
+ # Default: false
80
45
no-unaliased : true
81
46
alias :
82
47
# Kubernetes
@@ -93,60 +58,34 @@ linters-settings:
93
58
# Controller Runtime
94
59
- pkg : sigs.k8s.io/controller-runtime
95
60
alias : ctrl
96
- gosimple :
97
- go : " 1.17"
98
- staticcheck :
99
- go : " 1.17"
100
- stylecheck :
101
- go : " 1.17"
102
- unused :
103
- go : " 1.17"
104
61
tagliatelle :
105
62
case :
106
- # use-field-name: true
107
63
rules :
64
+ # Any struct tag type can be used.
65
+ # Support string case: `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`, `header`
108
66
json : goCamel
109
67
gomoddirectives :
110
- # Allow local `replace` directives. Default is false.
111
- replace-local : false
112
- # List of allowed `replace` directives. Default is empty.
68
+ # List of allowed `replace` directives.
69
+ # Default: []
113
70
replace-allow-list :
114
71
- sigs.k8s.io/cluster-api
115
- # Allow to not explain why the version has been retracted in the `retract` directives. Default is false.
116
- retract-allow-no-explanation : false
117
- # Forbid the use of the `exclude` directives. Default is false.
118
- exclude-forbidden : false
119
- gci :
120
- # put imports beginning with prefix after 3rd-party packages;
121
- # only support one prefix
122
- # if not set, use goimports.local-prefixes
123
- local-prefixes : sigs.k8s.io/cluster-api-provider-packet
124
72
goimports :
125
73
# put imports beginning with prefix after 3rd-party packages;
126
74
# it's a comma-separated list of prefixes
127
75
local-prefixes : sigs.k8s.io/cluster-api-provider-packet
128
76
nolintlint :
129
- # Enable to ensure that nolint directives are all used. Default is true.
130
- allow-unused : false
131
- # Disable to ensure that nolint directives don't have a leading space. Default is true.
132
- allow-leading-space : true
133
- # Exclude following linters from requiring an explanation. Default is [].
134
- allow-no-explanation : []
135
- # Enable to require an explanation of nonzero length after each nolint directive. Default is false.
136
- require-explanation : false
137
- # Enable to require nolint directives to mention the specific linter being suppressed. Default is false.
77
+ # Enable to require nolint directives to mention the specific linter being suppressed.
78
+ # Default: false
138
79
require-specific : true
139
- issues :
140
- exclude-rules :
141
- - linters :
142
- - lll
143
- - wsl
144
- source : " ^// \\ +kubebuilder:"
145
-
80
+ revive :
81
+ rules :
82
+ - name : unused-parameter
83
+ disabled : true
146
84
147
85
run :
86
+ go : ' 1.19'
148
87
timeout : 10m
149
88
skip-files :
150
89
- " zz_generated.*\\ .go$"
151
90
- " .*conversion.*\\ .go$"
152
- allow-parallel-runners : true
91
+ allow-parallel-runners : true
0 commit comments