-
Notifications
You must be signed in to change notification settings - Fork 111
/
.golangci.yml
75 lines (72 loc) · 1.51 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
run:
# timeout for analysis
timeout: 4m
linters-settings:
errorlint:
comparison: false
asserts: false
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
tagliatelle:
case:
rules:
json: snake
whitespace:
multi-func: true
multi-if: true
gosec:
excludes:
- G402 # Look for bad TLS connection settings.
- G306 # Poor file permissions used when writing to a new file.
exhaustive:
default-signifies-exhaustive: true
gocritic:
disabled-checks:
- unslice
- captLocal
- underef
- appendAssign
- exitAfterDefer
staticcheck:
checks: ['-SA1019']
lll:
# Max line length, lines longer will be reported.
line-length: 80
# Tab width in spaces.
tab-width: 8
linters:
enable:
- errorlint
- gofmt
- govet
- staticcheck
- tagliatelle
- whitespace
- gosec
- unused
- gocritic
- unconvert
- nilerr
- exhaustive
- lll
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
- path: mock.go
linters:
- gosec
- path: internal/test/.*
linters:
- gosec
# Fix false positives because of build flags in itest directory.
- path: itest/.*
linters:
- unused
- deadcode
- varcheck
new-from-rev: c723abd3c9db8a6a2f3f1eaa85ce5aefb52c8170