-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.golangci.yml
61 lines (57 loc) · 1.38 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
run:
timeout: 10m
allow-parallel-runners: true
issues:
max-same-issues: 0
# don't skip warning about doc comments
# don't exclude the default set of lint
exclude-use-default: false
linters:
disable-all: true
enable:
- copyloopvar
- errcheck
- ginkgolinter
- goconst
- gocyclo
- gofmt
- goimports
- gosimple
- govet
- importas
- ineffassign
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- typecheck
- unconvert
- unparam
- unused
linters-settings:
revive:
rules:
- name: comment-spacings
- name: duplicated-imports
severity: warning
importas:
no-unaliased: true
alias:
# kcp operator
- pkg: github.com/kcp-dev/kcp-operator/sdk/apis/(\w+)/(v[\w\d]+)
alias: $1$2
# Kubernetes
- pkg: k8s.io/api/(\w+)/(v[\w\d]+)
alias: $1$2
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
alias: metav1
- pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
alias: apiextensionsv1
- pkg: k8s.io/apimachinery/pkg/api/errors
alias: apierrors
- pkg: k8s.io/apimachinery/pkg/util/errors
alias: kerrors
# Controller Runtime (otherwise this will usually lead to shadowing a local "client" variable)
- pkg: sigs.k8s.io/controller-runtime/pkg/client
alias: ctrlruntimeclient