-
Notifications
You must be signed in to change notification settings - Fork 6
/
.golangci.yml
65 lines (60 loc) · 1.42 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 for analysis
deadline: 10m
linters-settings:
govet:
# Don't report about shadowed variables
check-shadowing: false
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
exhaustive:
# check switch statements in generated files also
check-generated: false
# indicates that switch statements are to be considered exhaustive if a
# 'default' case is present, even if all enum members aren't listed in the
# switch
default-signifies-exhaustive: true
revive:
rules:
- name: var-naming
disabled: true
whitespace:
# Enforces newlines (or comments) after every multi-line if statement.
# Default: false
multi-if: true
# Enforces newlines (or comments) after every multi-line function signature.
# Default: false
multi-func: true
linters:
enable:
- exhaustive
- exportloopref
- gci
- gofmt
- misspell
- nilerr
- nlreturn
- revive
- unconvert
- unparam
- wastedassign
- execinquery
- nonamedreturns
- nosprintfhostport
- containedctx
- errchkjson
- contextcheck
- errname
- wastedassign
- nilerr
- gosec
- govet
- whitespace
issues:
exclude-rules:
# Exclude gosec from running for tests so that tests with weak randomness
# (math/rand) will pass the linter.
- path: _test\.go
linters:
- gosec