forked from pingcap/tidb-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
63 lines (60 loc) · 1.18 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
run:
skip-dirs:
- swaggerspec
- pkg/uiserver
- ui
timeout: 2m
issues:
include:
# Bring back all gosec checks
- EXC0006
- EXC0007
- EXC0008
- EXC0009
- EXC0010
exclude-rules:
# TODO: Current code base does not work well for these linters. We should bring back one by one.
- path: ^pkg/|^cmd/
linters:
- nestif
- exhaustive
- wastedassign
- errorlint
linters:
enable:
# Additionally enable some checkers
- asciicheck
- depguard
- dogsled
- durationcheck
- errorlint
- exhaustive
- exportloopref
- godot
- gofumpt
- goheader
- goimports
- gosec
- importas
- nestif
- prealloc
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- unconvert
- wastedassign
- whitespace
linters-settings:
goimports:
local-prefixes: github.com/pingcap/tidb-dashboard
exhaustive:
# only cover the case when default is not given
default-signifies-exhaustive: true
godot:
# exclude swag annotations
exclude:
- "^\\s*@"
goheader:
template: |-
Copyright {{ YEAR }} PingCAP, Inc. Licensed under Apache-2.0.