-
Notifications
You must be signed in to change notification settings - Fork 82
/
.golangci.yml
108 lines (105 loc) · 2.6 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
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
issues:
exclude-files:
- "zz_generated.*\\.go$"
# don't skip warning about doc comments
# don't exclude the default set of lint
exclude-use-default: false
exclude:
- "ST1000: at least one file in a package should have a package comment"
exclude-rules:
- path: _test\.go
linters:
- revive
text: "dot-imports: should not use dot imports"
# exclude deprecation warning otherwise we get an error for our own deprecations
- linters:
- staticcheck
text: "SA1019:"
- linters:
- govet
text: 'declaration of "(err|ctx)" shadows declaration at'
- linters:
- revive
text: "package-comments: should have a package comment"
# TODO (johscheuer): Ignore those linting issues for now and change it once we cut a new major release.
- linters:
- stylecheck
text: "ST1003: const StorageEngineRocksDbExperimental"
- linters:
- stylecheck
text: "ST1003: const StorageEngineRocksDbV1"
linters:
disable-all: true
# TODO(johscheuer): activate linters again and fix issues
enable:
- asciicheck
- bodyclose
- depguard
- dogsled
- errcheck
- errorlint
- exportloopref
# - goconst
# - gocritic
# - gocyclo
- gofmt
#- goimports
- goprintffuncname
# - gosec
- gosimple
- govet
- importas
- ineffassign
- misspell
- nakedret
- nilerr
# - nolintlint
- prealloc
- revive
- rowserrcheck
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
linters-settings:
errcheck:
exclude-functions:
- (io.Closer).Close
- (*os.File).Close
- (github.com/FoundationDB/fdb-kubernetes-operator/pkg/fdbadminclient.AdminClient).Close
govet:
enable:
- shadow
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
run:
timeout: 10m
allow-parallel-runners: true