forked from CrunchyData/postgres-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
53 lines (50 loc) · 1.29 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# https://golangci-lint.run/usage/configuration/
linters:
disable:
- gofumpt
- scopelint
enable:
- depguard
- gomodguard
- gosimple
- importas
- misspell
presets:
- bugs
- format
- unused
linters-settings:
depguard:
include-go-root: true
packages-with-error-message:
- io/ioutil: >
Use the "io" and "os" packages instead.
See https://go.dev/doc/go1.16#ioutil
exhaustive:
default-signifies-exhaustive: true
goimports:
local-prefixes: github.com/crunchydata/postgres-operator
gomodguard:
blocked:
modules:
- gopkg.in/yaml.v2: { recommendations: [sigs.k8s.io/yaml] }
- gopkg.in/yaml.v3: { recommendations: [sigs.k8s.io/yaml] }
- gotest.tools: { recommendations: [gotest.tools/v3] }
- k8s.io/kubernetes:
reason: >
k8s.io/kubernetes is for managing dependencies of the Kubernetes
project, i.e. building kubelet and kubeadm.
importas:
alias:
- pkg: k8s.io/api/(\w+)/(v[\w\w]+)
alias: $1$2
- pkg: k8s.io/apimachinery/pkg/apis/(\w+)/(v[\w\d]+)
alias: $1$2
- pkg: k8s.io/apimachinery/pkg/api/errors
alias: apierrors
no-unaliased: true
run:
build-tags:
- envtest
skip-dirs:
- pkg/generated