-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
111 lines (103 loc) · 2.28 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
linters:
enable-all: false
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- decorder
- dogsled
- dupl
- durationcheck
- errchkjson
- errname
- errorlint
- exhaustive
- exportloopref
- forcetypeassert
- gci
- goconst
- gocritic
- godox
- gofmt
- goimports
- goprintffuncname
# - gosec
- importas
- ireturn
- misspell
- nilerr
- nilnil
- noctx
- nonamedreturns
- nosprintfhostport
- prealloc
- promlinter
- revive
- rowserrcheck
- sqlclosecheck
- tenv
- thelper
- unconvert
- unparam
- usestdlibvars
- wastedassign
linters-settings:
errcheck:
# Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
check-type-assertions: true
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`.
# Default: false
check-blank: true
# To disable the errcheck built-in exclude list.
# See `-excludeonly` option in https://github.com/kisielk/errcheck#excluding-functions for details.
# Default: false
disable-default-exclusions: true
govet:
# Settings per analyzer.
enable-all: true
exhaustive:
# Program elements to check for exhaustiveness.
check:
- switch
- map
misspell:
locale: US
promlinter:
# Promlinter cannot infer all metrics name in static analysis.
# Enable strict mode will also include the errors caused by failing to parse the args.
strict: true
# revive:
# Enable all available rules.
# rules:
# - name: atomic
# disabled: false
# - name: bare-return
# disabled: false
# - name: blank-imports
# disabled: false
# - name: bool-literal-in-expr
# disabled: false
# - name: call-to-gc
# disabled: false
# - name: confusing-naming
# disabled: false
# - name: constant-logical-expr
# disabled: false
# - name: context-as-argument
# disabled: false
# - name: datarace
# disabled: false
issues:
max-issues-per-linter: 100
max-same-issues: 100
run:
timeout: 5m