-
Notifications
You must be signed in to change notification settings - Fork 10
/
.golangci.yml
74 lines (68 loc) · 1.47 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
run:
# Allow multiple parallel golangci-lint instances running.
# If false (default) - golangci-lint acquires file lock on start.
allow-parallel-runners: true
output:
# sorts results by: filepath, line and column
sort-results: true
linters:
enable:
- errcheck
- gofmt
- goimports
- gosec
- govet
- ineffassign
- staticcheck
- typecheck
- revive
- unused
disable:
- gochecknoinits
- gochecknoglobals
linters-settings:
shadow:
enable: true
# report about shadowed variables
check-shadowing: true
# enable or disable analyzers by name
# run `go tool vet help` to see all analyzers
enable-all: true
golint:
min-confidence: 0.8
gocritic:
enabled-checks:
- appendCombine
- argOrder
- badCond
- dupBranchBody
- dupCase
- dupSubExpr
- elseif
- hugeParam
- initClause
- rangeValCopy
- sloppyLen
- typeSwitchVar
- underef
- unlambda
- unslice
gofmt:
simplify: true
goimports:
local-prefixes: github.com/myorg/mypackage
errcheck:
check-type-assertions: true
check-blank: true
issues:
exclude-use-default: false
exclude-rules:
- linters:
- govet
text: "composite literal uses unkeyed fields"
- linters:
- golint
text: "should have comment or be unexported"
- linters:
- staticcheck
text: "SA5001: should check returned error before deferring"