1
- run :
2
- timeout : 5m
1
+ version : " 2"
2
+ output :
3
+ formats :
4
+ tab :
5
+ path : stdout
6
+ print-linter-name : true
7
+ colors : false
3
8
linters :
4
9
enable :
5
10
- bodyclose
@@ -11,66 +16,69 @@ linters:
11
16
- gochecknoinits
12
17
- goconst
13
18
- gocritic
14
- - gofmt
15
- - goimports
16
19
- gosec
17
- - govet
18
20
- lll
19
21
- misspell
20
22
- mnd
21
23
- nakedret
22
24
- noctx
23
25
- nolintlint
24
- - stylecheck
26
+ - staticcheck
25
27
- unconvert
26
28
- unparam
27
- linters-settings :
28
- goconst :
29
- # Exclude few word constants
30
- min-len : 20
31
- # Don't use goconst to check test files
32
- ignore-tests : true
29
+ settings :
30
+ goconst :
31
+ min-len : 20
32
+ exclusions :
33
+ generated : lax
34
+ presets :
35
+ - comments
36
+ - common-false-positives
37
+ - legacy
38
+ - std-error-handling
39
+ rules :
40
+ - linters :
41
+ - mnd
42
+ text : ' Magic number: [0-9]{1},'
43
+ - linters :
44
+ - mnd
45
+ text : ' Magic number: 0[0-7]{3},'
46
+ - linters :
47
+ - mnd
48
+ path : pkg/controllers/proxy/network_services_controller.go
49
+ text : ' Magic number: 255,'
50
+ - linters :
51
+ - mnd
52
+ text : ' Magic number: 32,'
53
+ - linters :
54
+ - mnd
55
+ text : ' Magic number: 10,'
56
+ - linters :
57
+ - gosec
58
+ text : ' G306:'
59
+ - linters :
60
+ - lll
61
+ path : _test\.go
62
+ - linters :
63
+ - dupl
64
+ path : _test\.go
65
+ - linters :
66
+ - goconst
67
+ path : (.+)_test\.go
68
+ paths :
69
+ - third_party$
70
+ - builtin$
71
+ - examples$
33
72
issues :
34
- exclude-rules :
35
- # Excluding single digits from magic number detector because it produces too many obvious results (like klog)
36
- - text : " Magic number: [0-9]{1},"
37
- linters :
38
- - mnd
39
- # Exclude file masks from magic number detector because these numbers are obvious
40
- - text : " Magic number: 0[0-7]{3},"
41
- linters :
42
- - mnd
43
- # Exlude IP masks netmasks as substituting them for constants only makes these less obvious
44
- - text : " Magic number: 255,"
45
- linters :
46
- - mnd
47
- path : pkg/controllers/proxy/network_services_controller.go
48
- # Exclude IP netmasks from magic number detector because these numbers are obvious
49
- - text : " Magic number: 32,"
50
- linters :
51
- - mnd
52
- # Exclude decimal bases from magic number detector because these numbers are obvious
53
- - text : " Magic number: 10,"
54
- linters :
55
- - mnd
56
- # Exclude file mask security findings as we are always intentional about the file masks we use
57
- - text : " G306:"
58
- linters :
59
- - gosec
60
- # Exclude tests from long line linter
61
- - linters :
62
- - lll
63
- path : _test\.go
64
- # Exclude tests from duplicate linter
65
- - linters :
66
- - dupl
67
- path : _test\.go
68
- # always show all issues rather than only showing 50 at a time
69
73
max-issues-per-linter : 0
70
- # always show all issues of a type rather than showing 3
71
74
max-same-issues : 0
72
- output :
73
- formats :
74
- - format : tab
75
- print-issued-lines : true
76
- print-linter-name : true
75
+ formatters :
76
+ enable :
77
+ - gofmt
78
+ - goimports
79
+ exclusions :
80
+ generated : lax
81
+ paths :
82
+ - third_party$
83
+ - builtin$
84
+ - examples$
0 commit comments