-
Notifications
You must be signed in to change notification settings - Fork 89
/
golangci.yaml
37 lines (36 loc) · 1.16 KB
/
golangci.yaml
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
linters:
disable:
- megacheck
enable:
- bodyclose
- gomodguard
- gosec
- gosimple
- staticcheck
- stylecheck
- unused
linters-settings:
depguard:
list-type: blacklist
include-go-root: false
packages-with-error-message:
# specify an error message to output when a blacklisted package is used
- github.com/sirupsen/logrus: "Only the internal package pkg/log is allowed"
- sigs.k8s.io/controller-runtime/pkg/log: "Only the internal package pkg/log is allowed"
- sigs.k8s.io/controller-runtime/pkg/log/zap: "Only the internal package pkg/log is allowed"
issues:
exclude:
- "weak cryptographic primitive"
- "Blacklisted import `crypto/md5`"
- "G101: Potential hardcoded credentials"
- "G306: Expect WriteFile permissions to be 0600 or less"
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
# since we are using ginkgo we must use dot imports
- linters: ["stylecheck"]
text: "ST1001: should not use dot imports"
path: test/
- text: ".*"
path: pkg/elasticsearch/client.go
- text: ".*"
path: pkg/elasticsearch/client_test.go