mirror of
https://github.com/kyverno/kyverno.git
synced 2025-01-20 18:52:16 +00:00
codeclimate and golangci-lint added
Signed-off-by: Yuvraj <yuvraj.yad001@gmail.com>
This commit is contained in:
parent
801c7513cb
commit
69eeb34bef
3 changed files with 38 additions and 3 deletions
18
.codeclimate.yml
Normal file
18
.codeclimate.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
engines:
|
||||||
|
govet:
|
||||||
|
enabled: true
|
||||||
|
golint:
|
||||||
|
enabled: false
|
||||||
|
gofmt:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
ratings:
|
||||||
|
paths:
|
||||||
|
- "**.go"
|
||||||
|
|
||||||
|
exclude_paths:
|
||||||
|
- documentation/
|
||||||
|
- definitions
|
||||||
|
- gh-pages
|
||||||
|
- samples
|
||||||
|
- scripts
|
17
.golangci.yml
Normal file
17
.golangci.yml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
linters:
|
||||||
|
enable:
|
||||||
|
- gosec
|
||||||
|
- errcheck
|
||||||
|
- gosimple
|
||||||
|
- bodyclose
|
||||||
|
- staticcheck
|
||||||
|
disable:
|
||||||
|
- ineffassign
|
||||||
|
- deadcode
|
||||||
|
- unused
|
||||||
|
- structcheck
|
||||||
|
|
||||||
|
run:
|
||||||
|
skip-files:
|
||||||
|
- ".+_test.go"
|
||||||
|
- ".+_test_.+.go"
|
|
@ -93,15 +93,15 @@ func init() {
|
||||||
flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
|
flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
|
||||||
err := flag.Set("logtostderr", "true")
|
err := flag.Set("logtostderr", "true")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("failed to set flag", err)
|
glog.Errorf("failed to set flag %v", err)
|
||||||
}
|
}
|
||||||
err = flag.Set("stderrthreshold", "WARNING")
|
err = flag.Set("stderrthreshold", "WARNING")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("failed to set flag", err)
|
glog.Errorf("failed to set flag %v", err)
|
||||||
}
|
}
|
||||||
err = flag.Set("v", "2")
|
err = flag.Set("v", "2")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("failed to set flag", err)
|
glog.Errorf("failed to set flag %v", err)
|
||||||
}
|
}
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue