forked from gardener/logging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
47 lines (43 loc) · 1.58 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
run:
concurrency: 4
linters-settings:
errcheck:
exclude-functions:
- (github.com/go-kit/kit/log.Logger).Log
- (*github.com/weaveworks/common/logging.Level).Set
- (*github.com/cortexproject/cortex/pkg/util/flagext.URLValue).Set
linters:
disable:
- unused
enable:
- revive
issues:
exclude-use-default: false
exclude:
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked
# revive:
- var-naming # ((var|const|struct field|func) .* should be .*
- dot-imports # should not use dot imports
- package-comments # package comment should be of the form
- unexported-return # exported func .* returns unexported type .*, which can be annoying to use
- indent-error-flow # if block ends with a return statement, so drop this else and outdent its block
- "exported: (type|func) name will be used as .* by other packages, and that stutters;"
# typecheck:
- "undeclared name: `.*`"
- "invalid operation: cannot compare .*"
- "client.StopWait undefined .*"
- "could not import github.com/gardener/gardener/pkg/apis/core/v1beta1/constants .*"
- "Error return value of `informer.AddEventHandler` is not checked"
exclude-rules:
- linters:
- staticcheck
text: "SA1019:" # Excludes messages where deprecated variables are used
- path: cmd/out_vali\.go
linters:
- deadcode
exclude-files:
- ".*\\.pb\\.go$"
- ".*/out_vali\\.go$"
- ".*/.*_test\\.go$"
- "tests/.*"