diff --git a/.golangci.yml b/.golangci.yml index b9aafd78..a0b8723e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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: diff --git a/internal/store/persistentvolume.go b/internal/store/persistentvolume.go index ef31f40a..4516e3cd 100644 --- a/internal/store/persistentvolume.go +++ b/internal/store/persistentvolume.go @@ -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" diff --git a/internal/store/persistentvolume_test.go b/internal/store/persistentvolume_test.go index 4093e54a..4f00556f 100644 --- a/internal/store/persistentvolume_test.go +++ b/internal/store/persistentvolume_test.go @@ -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"}, diff --git a/pkg/util/proc/reaper.go b/pkg/util/proc/reaper.go index 56e77036..04d5e8e4 100644 --- a/pkg/util/proc/reaper.go +++ b/pkg/util/proc/reaper.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux /* diff --git a/tests/e2e/main_test.go b/tests/e2e/main_test.go index 9c62efba..363997ca 100644 --- a/tests/e2e/main_test.go +++ b/tests/e2e/main_test.go @@ -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) {