-
Notifications
You must be signed in to change notification settings - Fork 30
/
.golangci.yaml
78 lines (72 loc) · 1.67 KB
/
.golangci.yaml
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
run:
concurrency: 8
deadline: 3m
issues-exit-code: 1
tests: true
skip-dirs:
- vendor
skip-dirs-use-default: false
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
issues:
exclude-use-default: false
exclude:
- 'ST1000: at least one file in a package should have a package comment'
- 'package-comments: should have a package comment'
linters-settings:
govet:
# Enable all analyzers.
# Default: false
enable-all: true
# Disable analyzers by name.
# Run `go tool vet help` to see all analyzers.
# Default: []
disable:
- fieldalignment # too strict
# Settings per analyzer.
settings:
shadow:
# Whether to be strict about shadowing; can be noisy.
# Default: false
strict: true
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 45
goconst:
min-len: 3
min-occurrences: 4
decorder:
# Required order of `type`, `const`, `var` and `func` declarations inside a file.
# Default: types before constants before variables before functions.
dec-order:
- type
- const
- var
- func
linters:
disable-all: true
enable: # NOTE: please keep this list alphabetically sorted
- bodyclose
- decorder
- dogsled
#- errcheck
- goconst
- gocyclo
- goimports
#- gosec
- gosimple
- govet
- ineffassign
- megacheck
- misspell
- revive
- stylecheck
- staticcheck # is a go vet on steroids, applying a ton of static analysis checks
- typecheck
- unconvert
- unparam
- unused
- whitespace
fast: false