-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.golangci.yml
53 lines (46 loc) · 1.22 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
linters:
# Disable all linters, we explicitly opt into ones we want.
disable-all: true
enable:
- errcheck
- gofumpt
- goimports
- gosec
- gosimple
- govet
- importas
- ineffassign
- misspell
- staticcheck
- stylecheck
- unparam
- unused
linters-settings:
goimports:
local-prefixes: github.com/redpanda-data/redpanda-operator,github.com/redpanda-data/helm-charts
gosec:
excludes:
- G115 # integer overflows aren't super likely to be a problem for us and we're really just at the mercy of the APIs we use.
config:
G306: "0644" # Maximum allowed os.WriteFile Permissions
importas:
alias:
- pkg: k8s.io/api/(\w+)/(v\d)
alias: $1$2
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
alias: metav1
stylecheck:
checks: ["*", "-ST1005"]
issues:
exclude-rules:
# unparam will complain about functions that are called with a constant
# parameter. In production code, that may be helpful but it harms the
# readability of test code to eliminate such cases.
- linters:
- unparam
text: "always receives"
path: '(.+)_test\.go'
# We're not aiming to be secure in our tests.
- linters:
- gosec
path: '(.+)_test\.go'