-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yaml
116 lines (110 loc) · 2.19 KB
/
.golangci.yaml
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
113
114
115
116
run:
timeout: 240s
tests: true
linters-settings:
lll:
line-length: 128
goimports:
local-prefixes: "github.com/HewlettPackard"
godox:
keywords:
- OPTIMIZE
exhaustive:
default-signifies-exhaustive: true
funlen:
lines: 90
statements: 60
cyclop:
max-complexity: 14
revive:
rules:
- name: exported
arguments:
- disableStutteringCheck
- name: var-naming
# Suppress warnings about Id "initialism" - i.e. make Id and ID valid
arguments: [["ID"]]
linters:
disable-all: true
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- cyclop
- decorder
- dogsled
- dupl
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- funlen
- gocognit
- gocritic
- gocyclo
- godox
- gofmt
- gofumpt
- goheader
- goimports
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- grouper
- importas
- ineffassign
- lll
- maintidx
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nonamedreturns
- nosprintfhostport
- paralleltest
- prealloc
- predeclared
- revive
- staticcheck
- stylecheck
- tenv
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- whitespace
issues:
include:
# Match function comment to function name
- EXC0012
- EXC0013
- EXC0014
- EXC0015
exclude:
# We want to allow exporting const/var/type without comments
# but enforce comments for functions/methods.
# TODO: Remove method and function from the below (when we can)
- "exported (const|var|type|method|function) (.+) should have comment (.+) or be unexported"
- "exported (const|var|type|method|function) (.+) should have comment or be unexported"
# don't read the vendor folder.
exclude-dirs-use-default: true
exclude-rules:
# ignore function length for tests as look up tables typically exceed.
- linters:
- funlen
path: _test\.go
max-same-issues: 0