forked from kube-arbiter/arbiter-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
99 lines (95 loc) · 2.1 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
run:
timeout: 30m
# modules-download-mode: "mod"
linters:
disable-all: true
enable:
# linters maintained by golang.org
- gofmt
- goimports
- govet
# linters enabled by default
- errcheck
- ineffassign
- gosimple
- govet
- staticcheck
- typecheck
- unused
# custom
# please keep this alphabetized
- asasalint
- bidichk
- bodyclose
- containedctx
# - contextcheck # TODO(Abirdcfly): make it run
- dupl
- durationcheck
- dupword
- errchkjson
- errname
- gci
- goconst
# - godox # useful but will make golangci-lint return exit code 1 and check failed
- goheader
- grouper
- misspell
- nilerr
- nolintlint
- prealloc
- promlinter
- revive
- stylecheck
- tagliatelle
- tenv
- tparallel
- unconvert
- usestdlibvars
# - wastedassign # need generics support https://github.com/golangci/golangci-lint/issues/2649
- whitespace
issues:
max-same-issues: 0
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- errcheck
- dupl
- deadcode
- unused
- path: hack/tools/tools\.go
linters:
- typecheck
# - path: pkg/apis/schedulerconfig/v1beta1/defaults.go
# linters:
# - stylecheck
# text: ST1003 # defaults should use underscores
# when fix is true, golangci-lint will try to fix issue, and exit code is 0!
# fix: true
linters-settings: # please keep this alphabetized
errcheck:
check-type-assertions: true
disable-default-exclusions: true
exclude-functions:
- io/ioutil.ReadFile
- io.Copy(*bytes.Buffer)
- io.Copy(os.Stdout)
gci:
sections:
- standard
- default
- prefix(github.com/kube-arbiter/arbiter)
- blank
- dot
skip-generated: true
custom-order: true
revive:
ignore-generated-header: true
severity: error
#enable-all-rules: true # TODO(Abirdcfly): should chose some rules
staticcheck:
checks: [
"all",
]
severity:
default-severity: error