-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
134 lines (125 loc) · 2.57 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
run:
modules-download-mode: readonly
timeout: 10m
allow-parallel-runners: true
linters:
disable-all: true
enable:
- goimports
- revive
- govet
- errcheck
- gosimple
- staticcheck
- stylecheck
- unused
- exhaustive
- gocritic
- gosec
- unparam
- whitespace
- exportloopref
- errorlint
- bodyclose
- staticcheck
- err113
- errname
- forcetypeassert
- nolintlint
- gci
# unverified linters (not sure what they does):
- asciicheck
- bidichk
- cyclop
- dogsled
- durationcheck
- gocognit
- gocyclo
- gofmt
- gomoddirectives
- gomodguard
- goprintffuncname
- importas
- ineffassign
- makezero
- nakedret
- nilerr
- noctx
- prealloc
- predeclared
- promlinter
- rowserrcheck
- sqlclosecheck
- tenv
- thelper
- typecheck
- unconvert
- wastedassign
linters-settings:
govet:
enable:
- shadow
gocritic:
enabled-tags:
- performance
staticcheck:
checks: ["all"]
stylecheck:
checks: ["all"]
revive:
# see https://github.com/mgechev/revive#available-rules for details.
ignore-generated-header: true
severity: warning
directives:
- name: specify-disable-reason
arguments:
severity: "error"
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
arguments:
- disableStutteringCheck
- name: if-return
- name: increment-decrement
- name: var-naming
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: indent-error-flow
- name: errorf
- name: empty-block
- name: superfluous-else
- name: unused-parameter
- name: unreachable-code
- name: redefines-builtin-id
- name: indent-error-flow
severity: warning
- name: add-constant
severity: warning
arguments:
- maxLitCount: "3"
allowStrs: '"","%w %w","%s %w","%w : %s"'
allowInts: "0,1,2,3"
allowFloats: "0.0,0.,1.0,1.,2.0,2."
issues:
exclude-rules:
- path: '(.+)_test\.go'
linters:
- err113
- gosec
- bodyclose
- path: '(.+)_test\.go'
linters:
- revive
text: "^add-constant:.*"
output:
formats:
- format: line-number
path: stderr