-
Notifications
You must be signed in to change notification settings - Fork 97
/
.golangci.yml
118 lines (116 loc) · 2.61 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
linters-settings:
exhaustive:
check:
- switch
- map
default-signifies-exhaustive: true
lll:
line-length: 120
gci:
sections:
- standard # Captures all standard packages if they do not match another section.
- default # Contains all imports that could not be matched to another section type.
- prefix(github.com/controlplaneio/simulator/) # Groups all imports with the specified Prefix.
issues:
exclude-rules:
# disable funlen for test funcs
- source: "^func Test"
linters:
- funlen
linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- decorder
# - depguard # just for limiting packages
- dogsled
- dupl
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
# - exhaustruct
- exportloopref
- forbidigo
- forcetypeassert
# - funlen # complexity
# disable gci while it doesn't play nice with gofumpt and goimports
# https://github.com/golangci/golangci-lint/issues/1490
# - gci
# - ginkgolinter # not using ginkgo
- gocheckcompilerdirectives
- gochecknoglobals
- gochecknoinits
- gocognit # complexity
- goconst
- gocritic
# - gocyclo # using gocognit
# - godot # comment style
- gofmt
# - gofumpt
- goheader
- goimports
- gomnd # detect loose numbers
- gomoddirectives # not sure
- gomodguard # same as depguard?
- goprintffuncname
- gosec
- gosmopolitan
- gosimple
- govet
- grouper
- importas # configure this
- interfacebloat # maybe configure
- ineffassign
- ireturn
- lll
- loggercheck
# - maintidx # using gocognit
- makezero
- mirror
- misspell
- musttag
- nakedret
# - nestif # using gocognit
- nilerr
- nilnil
# - nlreturn # probably not
- noctx
- nolintlint
- nonamedreturns # maybe
- nosprintfhostport
- paralleltest
- prealloc
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- stylecheck
- tagalign
- tagliatelle
- tenv
- testpackage
- thelper
- tparallel # same with parallel test
- unconvert
- unparam
- usestdlibvars
- unused
- varnamelen
- wastedassign
- whitespace
- wrapcheck
# - wsl