-
Notifications
You must be signed in to change notification settings - Fork 469
/
.golangci.yml
75 lines (75 loc) · 1.94 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
run:
timeout: 5m
linters:
enable:
- bodyclose
- dogsled
- dupl
- durationcheck
- exportloopref
- exhaustive
- gochecknoinits
- goconst
- gocritic
- gofmt
- goimports
- gomnd
- gosec
- govet
- lll
- misspell
- nakedret
- noctx
- nolintlint
- stylecheck
- unconvert
- unparam
linters-settings:
goconst:
# Exclude few word constants
min-len: 20
# Don't use goconst to check test files
ignore-tests: true
issues:
exclude-rules:
# Excluding single digits from magic number detector because it produces too many obvious results (like klog)
- text: "Magic number: [0-9]{1},"
linters:
- gomnd
# Exclude file masks from magic number detector because these numbers are obvious
- text: "Magic number: 0[0-7]{3},"
linters:
- gomnd
# Exlude IP masks netmasks as substituting them for constants only makes these less obvious
- text: "Magic number: 255,"
linters:
- gomnd
path: pkg/controllers/proxy/network_services_controller.go
# Exclude IP netmasks from magic number detector because these numbers are obvious
- text: "Magic number: 32,"
linters:
- gomnd
# Exclude decimal bases from magic number detector because these numbers are obvious
- text: "Magic number: 10,"
linters:
- gomnd
# Exclude file mask security findings as we are always intentional about the file masks we use
- text: "G306:"
linters:
- gosec
# Exclude tests from long line linter
- linters:
- lll
path: _test\.go
# Exclude tests from duplicate linter
- linters:
- dupl
path: _test\.go
# always show all issues rather than only showing 50 at a time
max-issues-per-linter: 0
# always show all issues of a type rather than showing 3
max-same-issues: 0
output:
format: tab
print-issued-lines: true
print-linter-name: true