generated from bartoszmajsak/template-golang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
79 lines (75 loc) · 1.7 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
69
70
71
72
73
74
75
76
77
78
79
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 12
dupl:
threshold: 128
funlen:
lines: 128
statements: 64
goconst:
min-len: 2
min-occurrences: 2
depguard:
list-type: blacklist
packages:
# logging is allowed only by "sigs.k8s.io/controller-runtime/pkg/runtime/log"
- github.com/sirupsen/logrus
misspell:
locale: US
ignore-words:
- istio
- k8s
lll:
line-length: 180
goimports:
local-prefixes: github.com/bartoszmajsak/github-changelog-generator
gocritic:
enabled-tags:
- performance
- style
- experimental
disabled-checks:
- wrapperFunc
- commentFormatting # https://github.com/go-critic/go-critic/issues/755
unused:
check-exported: true
linters:
enable-all: true
disable:
- gochecknoinits # k8s/istio generated APIs are using init()
- gochecknoglobals # TODO discuss
- gofmt # We use goimports and when using them both leads to contradicting errors
run:
deadline: 10m
skip-dirs:
- ./pkg/apis
- ./pkg/assets/generated
- ./pkg/client/clientset
issues:
exclude-rules:
- path: pkg/openshift/
linters:
- dupl
- path: pkg/k8s/
linters:
- dupl
- path: pkg/apis/
linters:
- stylecheck
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- unused
service:
project-path: github.com/bartoszmajsak/github-changelog-generator
golangci-lint-version: 1.17.x # Locks the version to avoid newly introduces linters
prepare:
- make lint-prepare