Merge pull request #8444 from prometheus/upgrade_golangci-lint-1.36.0

Update golangci-lint to 1.36.0
This commit is contained in:
Julien Pivotto 2021-02-05 09:18:25 +01:00 committed by GitHub
commit b0642fb42f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View File

@ -83,7 +83,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v1.18.0
GOLANGCI_LINT_VERSION ?= v1.36.0
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
# windows isn't included here because of the path separator being different.
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))

View File

@ -1571,7 +1571,7 @@ func getPointSlice(sz int) []Point {
}
func putPointSlice(p []Point) {
//lint:ignore SA6002 relax staticcheck verification.
//nolint:staticcheck // Ignore SA6002 relax staticcheck verification.
pointPool.Put(p[:0])
}

View File

@ -551,7 +551,7 @@ Outer:
h.lastSeriesID.Store(s.Ref)
}
}
//lint:ignore SA6002 relax staticcheck verification.
//nolint:staticcheck // Ignore SA6002 relax staticcheck verification.
seriesPool.Put(v)
case []record.RefSample:
samples := v
@ -584,7 +584,7 @@ Outer:
}
samples = samples[m:]
}
//lint:ignore SA6002 relax staticcheck verification.
//nolint:staticcheck // Ignore SA6002 relax staticcheck verification.
samplesPool.Put(v)
case []tombstones.Stone:
for _, s := range v {
@ -599,7 +599,7 @@ Outer:
h.tombstones.AddInterval(s.Ref, itv)
}
}
//lint:ignore SA6002 relax staticcheck verification.
//nolint:staticcheck // Ignore SA6002 relax staticcheck verification.
tstonesPool.Put(v)
default:
panic(fmt.Errorf("unexpected decoded type: %T", d))
@ -1107,7 +1107,7 @@ func (h *Head) getAppendBuffer() []record.RefSample {
}
func (h *Head) putAppendBuffer(b []record.RefSample) {
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
h.appendPool.Put(b[:0])
}
@ -1120,7 +1120,7 @@ func (h *Head) getSeriesBuffer() []*memSeries {
}
func (h *Head) putSeriesBuffer(b []*memSeries) {
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
h.seriesPool.Put(b[:0])
}
@ -1133,7 +1133,7 @@ func (h *Head) getBytesBuffer() []byte {
}
func (h *Head) putBytesBuffer(b []byte) {
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
h.bytesPool.Put(b[:0])
}

View File

@ -890,19 +890,19 @@ func (r *walReader) Read(
if seriesf != nil {
seriesf(v)
}
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
seriesPool.Put(v[:0])
case []record.RefSample:
if samplesf != nil {
samplesf(v)
}
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
samplePool.Put(v[:0])
case []tombstones.Stone:
if deletesf != nil {
deletesf(v)
}
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
deletePool.Put(v[:0])
default:
level.Error(r.logger).Log("msg", "unexpected data type")