-
Notifications
You must be signed in to change notification settings - Fork 11
/
.golangci.yaml
41 lines (41 loc) · 1.25 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
linters:
enable:
- revive
- gosec
- whitespace
- godot
- misspell
- bodyclose
- errname
- errorlint
issues:
exclude-rules:
# Unused parameter warnings are annoying in tests.
- path: _test\.go
linters: ["revive"]
text: "unused-parameter"
# For test helpers it's often convenient to pass *testing.T as the first parameter.
# We don't care if context is not the first argument here.
- path: _test\.go
text: "context-as-argument"
linters: ["revive"]
# In tests we can use math/rand instead of crypto/rand.
- path: _test\.go
text: "weak random number generator"
linters: ["gosec"]
# Get rid of the annoying "if-return" rule.
# It gets in the way as soon as you decide to wrap the last error instead of returning it.
- text: "if-return"
linters: ["revive"]
include:
# Include revive rules that check comments on exported identifiers. These rules
# are excluded by default, and IMHO this doesn't serve well the Go community.
- EXC0011
- EXC0012
- EXC0013
- EXC0014
- EXC0015
# gosec: Too relaxed permission for created files and directories.
- EXC0009
# staticcheck: Unnecessary breaks in switch statements.
- EXC0005