This repository has been archived by the owner on Jan 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
.golangci.yml
141 lines (139 loc) · 3.13 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
131
132
133
134
135
136
137
138
139
140
141
# https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
run:
concurrency: 70
timeout: 10m
skip-dirs:
- "(^|/)mocks($|/)"
allow-parallel-runners: true
modules-download-mode: vendor
linters:
enable:
- asciicheck
- bodyclose
- cyclop
- deadcode
- depguard
- dogsled
- dupl
- durationcheck
- errcheck
- errorlint
- exhaustive
- exportloopref
- forbidigo
- gci
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- gofmt
- gofumpt
- goheader
- goimports
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- ifshort
- importas
- ineffassign
- makezero
- misspell
- nakedret
- nilerr
- noctx
- prealloc
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- testpackage
- thelper
- tparallel
- typecheck
- unconvert
- unused
- varcheck
- wastedassign
disable:
- wsl
- interfacer
- gochecknoglobals
- nolintlint
- goerr113
- lll
- exhaustivestruct
- nlreturn
- whitespace
- nestif
- scopelint
- godox
- godot
- unparam
- wrapcheck
- forcetypeassert
- paralleltest
- maligned
- funlen
linters-settings:
gomoddirectives:
replace-allow-list:
- github.com/coreos/bbolt
importas:
alias:
- pkg: k8s.io/apimachinery/pkg/apis/(\w+)/(v[\w\d]+)
alias: $1$2
- pkg: github.com/logicmonitor/k8s-argus/pkg/log
alias: lmlog
- pkg: github.com/logicmonitor/k8s-argus/pkg/rl
alias: rlm
- pkg: github.com/logicmonitor/k8s-argus/pkg/utilities
alias: util
- pkg: k8s.io/api/(\w+)/(v[\w\d]+)
alias: $1$2
- pkg: github.com/sirupsen/logrus
alias: logrus
- pkg: k8s.io/client-go/tools/cache
alias: toolscache
- pkg: github.com/logicmonitor/k8s-argus/pkg/rl
alias: ratelimiter
- pkg: k8s.io/apimachinery/pkg/types
alias: k8stypes
gomodguard:
allowed:
domains:
- golang.org
- k8s.io
- google.golang.org/grpc
- github.com/prometheus
- github.com/go-openapi
- github.com/google
- github.com/coreos/etcd
- github.com/golang
modules:
- github.com/sirupsen/logrus
- github.com/robfig/cron/v3
- github.com/Knetic/govaluate
- github.com/stretchr/testify
- github.com/kelseyhightower/envconfig
- github.com/spf13/cobra
- gopkg.in/yaml.v3
- github.com/logicmonitor/lm-sdk-go
- github.com/logicmonitor/k8s-collectorset-controller
- github.com/pkg/profile
- github.com/senseyeio/duration
blocked:
modules:
- gopkg.in/yaml.v2:
recommendations:
- gopkg.in/yaml.v3
reason: "v3 is recommended to use, not v2"
- github.com/davecgh/go-spew:
reason: considered to be log flooder; not supposed to use as it dumps whole object using reflection