forked from hyperledger-labs/fabric-operator
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.golangci.yaml
102 lines (98 loc) · 2.12 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
100
101
102
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
# - dupl
# - durationcheck
# - dupword
# - errchkjson
# - errname
# - gci
# - goconst
# - gocritic
# # - 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: 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/IBM-Blockchain/fabric-operator)
- 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",
]
gosimple:
checks: [
"all",
"-S1034"
]
severity:
default-severity: error