-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
65 lines (62 loc) · 1.47 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
run:
timeout: 5m
allow-parallel-runners: true
linters-settings:
dupl:
# Increased from 150 because this operator contain a lot of boilerplate.
threshold: 200
goimports:
local-prefixes: github.com/quortex/kubestatic
gocyclo:
# Increased from 30 because existing reconcile functions are complex.
min-complexity: 40
lll:
line-length: 150
linters:
disable-all: true
enable:
- dupl
- errcheck
- exportloopref
- goconst
- gocyclo
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- prealloc
- staticcheck
- typecheck
- unconvert
- unparam
- unused
issues:
# Don't exclude the default set of lint
exclude-use-default: false
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
# Exclude `lll` issues for long comments starting with `go:generate` or `+kubebuilder`.
- source: "^//(go:generate|\\+kubebuilder)"
linters:
- lll
# Exclude dupl since controllers have a lot of boilerplate code, and exclude
# dynamic and unwrapped errors issues in controllers since they will only be logged.
- path: controllers/
linters:
- dupl
- goerr113
- wrapcheck
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- dupl
- goconst
- gocyclo
- gomnd
- funlen
- lll
- varnamelen