forked from telepresenceio/telepresence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
101 lines (91 loc) · 2.46 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
run:
build-tags:
- citest
issues:
# Give me the full output
max-same-issues: 0
# Use the default excludes...
exclude-use-default: false
# ...but also add some of our own
exclude:
- Error return value of `(\w+\.)+(Close|Flush|Remove|(Un)?Setenv|(Fp|P)rint(f|ln))\` is not checked
- 'structtag: struct field \w+ repeats json tag'
- 'Subprocess launched with function call as argument or cmd arguments'
exclude-rules:
- path: _test\.go
linters:
- const
- dupl
- gochecknoglobals
- goconst
- golint
- lll
- unparam
linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages-with-error-message:
- os/exec: "Use `github.com/datawire/dlib/dexec` instead of `os/exec`"
- github.com/golang/protobuf: "Use `google.golang.org/protobuf` instead of `github.com/golang/protobuf`"
- github/datawire/dlib/dutil: "Use either `github.com/datawire/dlib/derror` or `github.com/datawire/dlib/dhttp` instead of `github.com/datawire/dlib/dutil`"
- golang.org/x/net/http2/h2c: "Use `github.com/datawire/dlib/dhttp` instead of `golang.org/x/net/http2/h2c`"
- github.com/kballard/go-shellquote: "Use `github.com/telepresenceio/telepresence/pkg/client/logging.ShellString` instead of `github.com/kballard/go-shellquote.Join`"
gocyclo:
min-complexity: 35
gocognit:
min-complexity: 60
goimports:
# A comma-separated list
local-prefixes: github.com/telepresenceio,github.com/datawire
lll:
line-length: 180
tab-width: 2
nolintlint:
allow-unused: false
allow-leading-space: false
require-explanation: true
require-specific: true
linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- errcheck
- gocognit
- gocritic
- gocyclo
- gofmt
- goimports # temporarily use 'goimports' instead of 'gci' https://github.com/daixiang0/gci/pull/33
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- prealloc
- scopelint
- staticcheck
- structcheck
- typecheck
- unconvert
- unused
- varcheck
- whitespace
- nolintlint
# don't enable:
# - dupl
# - funlen
# - gochecknoglobals
# - gochecknoinits
# - goconst
# - godox
# - goimports # use gci instead
# - golint
# - gosec
# - interfacer
# - maligned # is premature-optimization
# - stylecheck
# - unparam