-
Notifications
You must be signed in to change notification settings - Fork 248
Expand file tree
/
Copy path.golangci.yaml
More file actions
128 lines (127 loc) · 2.95 KB
/
.golangci.yaml
File metadata and controls
128 lines (127 loc) · 2.95 KB
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
version: "2"
run:
timeout: 15m
linters:
default: none
enable:
- asciicheck
- bodyclose
- copyloopvar
- depguard
- dogsled
- durationcheck
- errcheck
- gochecknoinits
- gocritic
- goprintffuncname
- govet
- ineffassign
- misspell
- musttag
- nolintlint
- nonamedreturns
- prealloc
- revive
- sloglint
- staticcheck
- unconvert
- unparam
- unused
- whitespace
- usestdlibvars
settings:
depguard:
rules:
Main:
files:
- $all
deny:
- pkg: gopkg.in/satori/go.uuid.v1
desc: Use https://github.com/gofrs/uuid instead. Satori/go.uuid is no longer maintained and has critical vulnerabilities.
nolintlint:
allow-unused: true
nonamedreturns:
report-error-in-defer: false
sloglint:
no-mixed-args: true
kv-only: false
attr-only: false
no-global: ""
context: ""
static-msg: false
no-raw-keys: false
forbidden-keys:
- level
- msg
- logger
- source
- stacktrace
- time
args-on-sep-lines: false
staticcheck:
checks:
- all
- '-QF1008' # not need to fix; we understand how to call nested structs
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- path: (.+)\.go$
text: 'var-naming: don''t use an underscore in package name'
- path: (.+)\.go$
text: 'ST1003: should not use underscores in package names'
- path: (.+)\.go$
text: 'ST1005: error strings should not be capitalized'
- path: (.+)\.go$
text: 'error-strings: error strings should not be capitalized or end with punctuation or a newline'
- path: (.+)\.go$
text: 'ST1005: error strings should not end with punctuation or newlines'
- path: (.+)\.go$
text: 'dot-imports: should not use dot imports'
- path: (.+)\.go$
text: 'ST1001: should not use dot imports'
- path: (.+)\.go$
text: don't use `init` function
- path: (.+)\.go$
text: 'var-naming:'
- path: (.+)\.go$
text: 'ST1003: '
- path: (.+)\.go$
text: 'exported: type name will be used as'
- path: (.+)\.go$
text: 'unexported-return: exported func (.*), which can be annoying to use'
paths:
- test/integration
- third_party$
- builtin$
- examples$
- _test\.go$
issues:
max-issues-per-linter: 0
max-same-issues: 0
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/flant/)
goimports:
local-prefixes:
- github.com/flant/
exclusions:
generated: lax
paths:
- test/integration
- third_party$
- builtin$
- examples$