-
Notifications
You must be signed in to change notification settings - Fork 136
/
.golangci.yml
64 lines (61 loc) · 1.25 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
run:
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
# https://github.com/open-telemetry/opentelemetry-collector/issues/5699
- text: "G112:"
linters:
- gosec
exclude-dirs:
- swaggerspec
- pkg/uiserver
- ui
linters:
enable:
# Additionally enable some checkers
- asciicheck
# - depguard
- dogsled
- durationcheck
- errorlint
- exhaustive
- exportloopref
- godot
- gofumpt
- goheader
- goimports
- gosec
- importas
- nestif
- prealloc
- predeclared
- revive
- unconvert
- 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.