-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
59 lines (48 loc) · 1.27 KB
/
.golangci.yml
File metadata and controls
59 lines (48 loc) · 1.27 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
---
# Reference:
# https://github.com/golangci/golangci-lint/blob/HEAD/.golangci.reference.yml
# JSON schema:
# https://golangci-lint.run/jsonschema/golangci.jsonschema.json
version: "2"
formatters:
enable:
- golines # line length
- goimports # import order
- gofmt # formatting
- gci # stricter import order
settings:
golines:
max-len: 120
gci:
custom-order: true
sections:
- standard # Captures all standard packages.
- default # Contains all imports that could not be matched to another section type.
- localmodule # Contains all local packages.
- blank # Contains all blank imports.
- dot # Contains all dot imports.
linters:
# Default set of linters.
# The value can be: `standard`, `all`, `none`, or `fast`.
# Default: standard
default: standard
# https://golangci-lint.run/usage/linters/#enabled-by-default
enable:
- errcheck
- govet
- ineffassign
- staticcheck
- unused
- sloglint
# https://golangci-lint.run/usage/linters/#disabled-by-default
disable:
- asasalint
settings:
errcheck:
exclude-functions:
- (io.Closer).Close
- (*os.File).Close
sloglint:
key-naming-case: snake
exclusions:
warn-unused: true