forked from FoundationDB/fdb-kubernetes-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
120 lines (120 loc) · 3.06 KB
/
.golangci.yml
File metadata and controls
120 lines (120 loc) · 3.06 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"
run:
allow-parallel-runners: true
linters:
default: none
enable:
- asciicheck
- bodyclose
- copyloopvar
- depguard
- dogsled
- errcheck
- errorlint
- goprintffuncname
- govet
- importas
- ineffassign
- misspell
- nakedret
- nilerr
- prealloc
- revive
- rowserrcheck
- staticcheck
- unconvert
- unparam
- unused
- whitespace
settings:
depguard:
rules:
main:
allow:
- $gostd
- github.com/FoundationDB/fdb-kubernetes-operator
- github.com/apple/foundationdb
- github.com/google/go-cmp/cmp
- sigs.k8s.io/controller-runtime
- sigs.k8s.io/yaml
- k8s.io/kubectl
- k8s.io/apimachinery
- k8s.io/client-go
- k8s.io/cli-runtim
- k8s.io/api
- k8s.io/klog
- k8s.io/utils
- github.com/onsi/gomega
- github.com/onsi/ginkgo
- github.com/hashicorp
- github.com/spf13/cobra
- github.com/spf13/viper
- github.com/spf13/pflag
- github.com/fatih/color
- github.com/chaos-mesh
- github.com/prometheus
- github.com/go-logr
- golang.org/x/sync/errgroup
- gopkg.in/natefinch/lumberjack.v2
errcheck:
exclude-functions:
- (io.Closer).Close
- (*os.File).Close
- (github.com/FoundationDB/fdb-kubernetes-operator/pkg/fdbadminclient.AdminClient).Close
govet:
enable:
- shadow
exclusions:
generated: lax
rules:
- linters:
- revive
path: _test\.go
text: 'dot-imports: should not use dot imports'
- linters:
- staticcheck
text: 'SA1019:'
- linters:
- govet
text: declaration of "(err|ctx)" shadows declaration at
- linters:
- revive
text: 'package-comments: should have a package comment'
- linters:
- staticcheck
text: 'ST1003: const StorageEngineRocksDbExperimental'
- linters:
- staticcheck
text: 'ST1003: const StorageEngineRocksDbV1'
- path: (.+)\.go$
text: 'ST1000: at least one file in a package should have a package comment'
# TODO (johscheuer): Enable those linter exclusions again and fix them in a new PR.
- path: (.+)\.go$
linters:
- staticcheck
text: 'QF1008: could remove embedded field'
- path: (.+)\.go$
linters:
- staticcheck
text: 'QF1003: could use tagged switch'
- path: (.+)\.go$
linters:
- staticcheck
text: 'QF1001: could apply De Morgan'
paths:
- zz_generated.*\.go$
- third_party$
- builtin$
- examples$
# Ignore the chaos-mesh setup in linting for now.
- e2e/chaos-mesh/
formatters:
enable:
- gofmt
exclusions:
generated: lax
paths:
- zz_generated.*\.go$
- third_party$
- builtin$
- examples$