-
Notifications
You must be signed in to change notification settings - Fork 171
Expand file tree
/
Copy path.golangci.yml
More file actions
47 lines (47 loc) · 1.3 KB
/
.golangci.yml
File metadata and controls
47 lines (47 loc) · 1.3 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
version: "2"
linters:
# only enable the linters listed below
default: none
enable:
- asciicheck
# ensure that http response bodies are closed
- bodyclose
- copyloopvar
# make sure all errors returned by functions are handled
- errcheck
# examine code and report suspicious constructs, such as Printf calls whose
# arguments do not align with the format string
- govet
# consistent imports
- importas
# detect when assignments to existing variables are not used
- ineffassign
- nolintlint
# make sure names and comments are used according to the conventions
- revive
# run static analysis and find errors
- staticcheck
# find unused variables, functions, structs, types, etc.
- unused
exclusions:
rules:
- path: (.+)\.go$
text: exported (function|method|var|type|const) .* should have comment or be unexported
- path: (.+)\.go$
text: don't use ALL_CAPS in Go names; use CamelCase
- path: (.+)\.go$
text: "package-comments: should have a package comment"
- path: (.+)\.go$
text: "redefines-builtin-id:"
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
exclusions:
paths:
- third_party$
- builtin$
- examples$