forked from kanisterio/kanister
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
68 lines (63 loc) · 1.9 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
linters:
disable-all: false # This enabled 7 default linters as of golangci-lint@v1.50.0:
# 1. errcheck
# 2. gosimple
# 3. govet
# 4. ineffassign
# 5. staticcheck
# 6. typecheck
# 7. unused
enable:
- gofmt
- whitespace
- gocognit
- unparam
- gocyclo
- gocritic
- lll
- nakedret
- asciicheck
# - depguard # Disabling temporarily due to https://github.com/golangci/golangci-lint/issues/3906
- dogsled
- dupl
- exportloopref
- importas
- misspell
- nestif
run:
timeout: 10m # golangci-lint run's timeout.
build-tags: # All linters will run with below mentioned build tags.
- "integration"
issues:
exclude-rules:
- path: '_test.go'
linters:
- errcheck # Errors may be ignored in tests.
- unparam # Tests might have unused function parameters.
- lll
- dupl
- misspell
- nestif
- text: "`ctx` is unused" # Context might not be in use in places, but for consistency, we pass it.
linters:
- unparam
linters-settings:
gocyclo:
min-complexity: 20
lll:
line-length: 240
nakedret:
max-func-lines: 2
importas:
no-unaliased: true
alias:
- pkg: k8s.io/apimachinery/pkg/api/errors
alias: apierrors
- pkg: k8s.io/api/core/v1
alias: corev1
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
alias: metav1
- pkg: github.com/kanisterio/kanister/pkg/apis/cr/v1alpha1
alias: crv1alpha1
nestif:
min-complexity: 6