-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
112 lines (108 loc) · 2.29 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 16
cyclop:
max-complexity: 16
dupl:
threshold: 128
funlen:
lines: 128
statements: 64
goconst:
min-len: 4
min-occurrences: 3
depguard:
list-type: blacklist
packages:
- github.com/sirupsen/logrus
- sigs.k8s.io/controller-runtime/pkg/log
- sigs.k8s.io/controller-runtime/pkg/log/zap
- sigs.k8s.io/controller-runtime/pkg/runtime/log
misspell:
locale: US
ignore-words:
- istio
- k8s
lll:
line-length: 180
goimports:
local-prefixes: github.com/maistra/odh-platform
gocritic:
enabled-tags:
- performance
- style
- experimental
disabled-checks:
- wrapperFunc
- commentFormatting # https://github.com/go-critic/go-critic/issues/755
- hugeParam # seems to be premature optimization based on https://github.com/Maistra/istio-workspace/pull/378#discussion_r392208906
nestif:
min-complexity: 8
unused:
check-exported: true
gocognit:
min-complexity: 20
wrapcheck:
ignoreSigs:
- .Errorf(
- errors.New(
- errors.Unwrap(
- .Wrap(
- .Wrapf(
- .WithMessage(
- errors.WrapIfWithDetails
- errors.WithDetails(
- errors.WrapWithDetails(
- errors.WrapIf(
- errors.NewWithDetails(
linters:
enable-all: true
disable:
- depguard
- exhaustruct
- exhaustivestruct
- forbidigo
- gofmt # We use goimports and when using them both leads to contradicting errors
- gofumpt
- gomnd
- paralleltest
- prealloc
run:
deadline: 10m
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- path: test/
linters:
- goconst
- gocyclo
- golint
- errcheck
- dupl
- gosec
- revive
- stylecheck
- wrapcheck
# Exclude particular linters for tests files.
- path: _test\.go
linters:
- gochecknoglobals
- gocyclo
- errcheck
- dupl
- gosec
- revive
- wrapcheck
- path: _suite_test\.go
linters:
- revive
- unused