1
1
# golangci configuration
2
2
# Taken from https://github.com/kubevirt/kubevirt/blob/main/.golangci.yml
3
3
4
- linters-settings :
5
- dupl :
6
- threshold : 100
7
- funlen :
8
- lines : 100
9
- statements : 50
10
- goconst :
11
- min-len : 2
12
- min-occurrences : 3
13
- gocritic :
14
- enabled-tags :
15
- - diagnostic
16
- - experimental
17
- - opinionated
18
- - performance
19
- - style
20
- disabled-checks :
21
- - dupImport # https://github.com/go-critic/go-critic/issues/845
22
- - ifElseChain
23
- - octalLiteral
24
- - paramTypeCombine
25
- - whyNoLint
26
- - wrapperFunc
27
- settings :
28
- hugeParam :
29
- sizeThreshold : 1024
30
- rangeValCopy :
31
- sizeThreshold : 1024
32
- gocyclo :
33
- min-complexity : 15
34
- goimports :
35
- local-prefixes : github.com/0xfelix/cga-led
36
- mnd :
37
- # don't include the "operation" and "assign"
38
- checks : argument,case,condition,return
39
- ignored-functions :
40
- - ' ^Eventually$'
41
- - ' ^EventuallyWithOffset$'
42
- - ' ^ExpectWithOffset$'
43
- - ' ^console\.ExpectBatch$'
44
- - ' ^console\.RunCommand$'
45
- govet :
46
- enable :
47
- - shadow
48
- lll :
49
- line-length : 140
50
- maligned :
51
- suggest-new : true
52
- misspell :
53
- locale : US
54
- nolintlint :
55
- allow-leading-space : true # don't require machine-readable nolint directives (i.e. with no leading space)
56
- allow-unused : false # report any unused nolint directives
57
- require-explanation : false # don't require an explanation for nolint directives
58
- require-specific : false # don't require nolint directives to be specific about which linter is being skipped
59
- stylecheck :
60
- dot-import-whitelist :
61
- - " github.com/onsi/ginkgo/v2"
62
- - " github.com/onsi/gomega"
63
- gofumpt :
64
- extra-rules : true
65
-
4
+ version : " 2"
66
5
linters :
67
- disable-all : true
6
+ default : none
68
7
enable :
69
8
- bodyclose
9
+ - copyloopvar
70
10
- dogsled
71
11
- dupl
72
12
- errcheck
@@ -76,29 +16,22 @@ linters:
76
16
- goconst
77
17
- gocritic
78
18
- gocyclo
79
- - gofmt
80
- - gofumpt
81
19
- goheader
82
- - goimports
83
- - mnd
84
20
- goprintffuncname
85
21
- gosec
86
- - gosimple
87
22
- govet
88
23
- ineffassign
89
24
- lll
90
25
- misspell
26
+ - mnd
91
27
- nakedret
92
28
- noctx
93
29
- nolintlint
94
30
- rowserrcheck
95
31
- staticcheck
96
- - stylecheck
97
- - typecheck
98
32
- unconvert
99
33
- unused
100
34
- whitespace
101
-
102
35
# don't enable:
103
36
# - asciicheck
104
37
# - scopelint
@@ -114,3 +47,89 @@ linters:
114
47
# - testpackage
115
48
# - revive
116
49
# - wsl
50
+ settings :
51
+ dupl :
52
+ threshold : 100
53
+ funlen :
54
+ lines : 100
55
+ statements : 50
56
+ goconst :
57
+ min-len : 2
58
+ min-occurrences : 2
59
+ gocritic :
60
+ disabled-checks :
61
+ - dupImport # https://github.com/go-critic/go-critic/issues/845
62
+ - ifElseChain
63
+ - octalLiteral
64
+ - paramTypeCombine
65
+ - whyNoLint
66
+ - wrapperFunc
67
+ enabled-tags :
68
+ - diagnostic
69
+ - experimental
70
+ - opinionated
71
+ - performance
72
+ - style
73
+ settings :
74
+ hugeParam :
75
+ sizeThreshold : 1024
76
+ rangeValCopy :
77
+ sizeThreshold : 1024
78
+ gocyclo :
79
+ min-complexity : 15
80
+ govet :
81
+ enable :
82
+ - shadow
83
+ lll :
84
+ line-length : 140
85
+ misspell :
86
+ locale : US
87
+ mnd :
88
+ # don't include the "operation" and "assign"
89
+ checks :
90
+ - argument
91
+ - case
92
+ - condition
93
+ - return
94
+ ignored-functions :
95
+ - ^Eventually$
96
+ - ^EventuallyWithOffset$
97
+ - ^ExpectWithOffset$
98
+ - ^console\.ExpectBatch$
99
+ - ^console\.RunCommand$
100
+ nolintlint :
101
+ require-explanation : false # don't require an explanation for nolint directives
102
+ require-specific : false # don't require nolint directives to be specific about which linter is being skipped
103
+ allow-unused : false # report any unused nolint directives
104
+ staticcheck :
105
+ dot-import-whitelist :
106
+ - github.com/onsi/ginkgo/v2
107
+ - github.com/onsi/gomega
108
+ exclusions :
109
+ generated : lax
110
+ presets :
111
+ - comments
112
+ - common-false-positives
113
+ - legacy
114
+ - std-error-handling
115
+ paths :
116
+ - third_party$
117
+ - builtin$
118
+ - examples$
119
+ formatters :
120
+ enable :
121
+ - gofmt
122
+ - gofumpt
123
+ - goimports
124
+ settings :
125
+ gofumpt :
126
+ extra-rules : true
127
+ goimports :
128
+ local-prefixes :
129
+ - github.com/0xfelix/cga-led
130
+ exclusions :
131
+ generated : lax
132
+ paths :
133
+ - third_party$
134
+ - builtin$
135
+ - examples$
0 commit comments