-
Notifications
You must be signed in to change notification settings - Fork 163
/
.golangci.yml
130 lines (117 loc) · 2.78 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
119
120
121
122
123
124
125
126
127
128
129
130
run:
skip-dirs:
- .gen
- client
- plz-out
- lib
skip-files:
- ".*_gen\\.go$"
- "zz_generated\\..*\\.go$"
timeout: 10m
linters-settings:
revive:
confidence: 0.9
gocyclo:
min-complexity: 15
goimports:
local-prefixes: github.com/banzaicloud/pipeline/
depguard:
list-type: blacklist
include-go-root: false
packages:
- github.com/prometheus/common/log
packages-with-error-messages:
github.com/prometheus/common/log: "Global logger is deprecated. Inject a logger here. If you are trying to log in a function, chances are you should make it a struct."
linters:
enable-all: true
disable:
- funlen
- maligned
- wsl
- gomnd
- godot
# TODO: fixme
- gosec
- megacheck
- varcheck
# Disable govet for now because it fails on Circle
- govet
# TODO: fixme
- nestif
- exhaustive
- nlreturn
- noctx
- goerr113
- bodyclose
- dupl
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- interfacer
- lll
- nakedret
- prealloc
- scopelint
- stylecheck
- testpackage
- unparam
# Introduced with 1.50.0 since 1.30.0 (https://github.com/golangci/golangci-lint/blob/bac47a7e52a1dcd91fc7d3e33af2686e22cc9e0f/CHANGELOG.md)
# TODO: enable them one by one to test and configure
- asasalint
- bidichk
- contextcheck
- containedctx
- cyclop
- decorder
- dupword
- durationcheck
- errchkjson
- errname
- errorlint
- execinquery
- exhaustivestruct
- exhaustruct
- forbidigo
- forcetypeassert
- gomoddirectives
- grouper
- ifshort
- importas
- interfacebloat
- ireturn
- logrlint
- maintidx
- makezero
- nilerr
- nilnil
- nolintlint
- nonamedreturns
- nosnakecase
- nosprintfhostport
- paralleltest
- predeclared
- promlinter
- reassign
- tagliatelle
- tenv
- testableexamples
- thelper
- tparallel
- usestdlibvars
- varnamelen
- wastedassign
- wrapcheck
# incompatible with goimports
- gci
# deprecated (since v1.41.0), replaced by revive
- golint
# deprecated (since v1.49.0), replaced by unused
- deadcode
- structcheck
fast: false
issues:
max-issues-per-linter: 0
max-same-issues: 0