-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.golangci.yml
More file actions
120 lines (115 loc) · 2.84 KB
/
.golangci.yml
File metadata and controls
120 lines (115 loc) · 2.84 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
version: "2"
linters:
default: all
disable:
- exhaustruct
- godoclint
- lll
- noinlineerr
- testpackage
- unqueryvet
- varnamelen
- wsl
- wsl_v5
- godox # FIXME
settings:
cyclop:
max-complexity: 30
package-average: 0
ireturn:
allow:
- anon
- error
- empty
- stdlib
depguard:
rules:
main:
list-mode: strict
files:
- $all
- "!$test"
allow:
- $gostd
- github.com/go-sql-driver/mysql
- github.com/lmittmann/tint
- github.com/persona-id/proxysql-agent/
- github.com/spf13/pflag
- github.com/spf13/viper
- github.com/yassinebenaid/godump
- k8s.io/api/core/v1
- k8s.io/apimachinery/pkg/apis/meta/v1
- k8s.io/apimachinery/pkg/labels
- k8s.io/apimachinery/pkg/types
- k8s.io/apimachinery/pkg/util/runtime
- k8s.io/apimachinery/pkg/util/wait
- k8s.io/client-go/informers
- k8s.io/client-go/kubernetes
- k8s.io/client-go/rest
- k8s.io/client-go/tools/cache
- k8s.io/client-go/tools/record
- k8s.io/client-go/tools/record/test
funlen:
lines: -1
statements: 65
gocognit:
min-complexity: 40
goconst:
min-occurrences: 5
govet:
enable-all: true
disable:
- fieldalignment
tagliatelle:
case:
rules:
json: snake
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
rules:
# We can't parallelize these tests because they share the same configuration map when the test runs
# and maps are not thread-safe.
- path: internal/configuration/configuration_test\.go
linters:
- paralleltest
# G101: Test data with env var names is not hardcoded credentials
# G117: Password field name in config structs is not a hardcoded secret
# G703: File paths come from config/hostname, not user input
# G705: Internal API only accessible inside the pod
# G706: Logging probe results is safe
- linters:
- gosec
text: "G101|G117|G703|G705|G706"
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- gofmt
- gofumpt
- goimports
settings:
gofmt:
rewrite-rules:
- pattern: "interface{}"
replacement: "any"
- pattern: "a[b:len(a)]"
replacement: "a[b:]"
gofumpt:
extra-rules: true
goimports:
local-prefixes:
- github.com/persona-id/proxysql-agent/
exclusions:
generated: lax
run:
tests: true