Fix findings to make lint pass
Signed-off-by: Manuel Rüger <manuel@rueg.eu>
This commit is contained in:
parent
f4510e454b
commit
2e78af1ccd
|
|
@ -1,20 +1,21 @@
|
|||
run:
|
||||
deadline: 2m
|
||||
deadline: 5m
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- gocritic
|
||||
- gocyclo
|
||||
- gofmt
|
||||
- goimports
|
||||
- golint
|
||||
- staticcheck
|
||||
- gocyclo
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- misspell
|
||||
- gocritic
|
||||
- govet
|
||||
- unconvert
|
||||
- promlinter
|
||||
- revive
|
||||
- staticcheck
|
||||
- unconvert
|
||||
|
||||
linters-settings:
|
||||
goimports:
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import (
|
|||
|
||||
var (
|
||||
descPersistentVolumeClaimRefName = "kube_persistentvolume_claim_ref"
|
||||
descPersistentVolumeClaimRefHelp = "Information about the Persitant Volume Claim Reference."
|
||||
descPersistentVolumeClaimRefHelp = "Information about the Persistent Volume Claim Reference."
|
||||
descPersistentVolumeClaimRefDefaultLabels = []string{"persistentvolume"}
|
||||
|
||||
descPersistentVolumeAnnotationsName = "kube_persistentvolume_annotations"
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Want: `
|
||||
# HELP kube_persistentvolume_claim_ref Information about the Persitant Volume Claim Reference.
|
||||
# HELP kube_persistentvolume_claim_ref Information about the Persistent Volume Claim Reference.
|
||||
# TYPE kube_persistentvolume_claim_ref gauge
|
||||
kube_persistentvolume_claim_ref{claim_namespace="default",name="pv-claim",persistentvolume="test-claimed-pv"} 1
|
||||
`,
|
||||
|
|
@ -457,7 +457,7 @@ func TestPersistentVolumeStore(t *testing.T) {
|
|||
},
|
||||
},
|
||||
Want: `
|
||||
# HELP kube_persistentvolume_claim_ref Information about the Persitant Volume Claim Reference.
|
||||
# HELP kube_persistentvolume_claim_ref Information about the Persistent Volume Claim Reference.
|
||||
# TYPE kube_persistentvolume_claim_ref gauge
|
||||
`,
|
||||
MetricNames: []string{"kube_persistentvolume_claim_ref"},
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//go:build linux
|
||||
// +build linux
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ func TestDocumentation(t *testing.T) {
|
|||
for _, labelPattern := range acceptedLabelNames {
|
||||
re, err := regexp.Compile(labelPattern)
|
||||
if err != nil {
|
||||
t.Errorf("Cannot compile pattern %s: %w", labelPattern, err)
|
||||
t.Errorf("Cannot compile pattern %s: %v", labelPattern, err)
|
||||
continue
|
||||
}
|
||||
if re.MatchString(labelName) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue