Skip to content

Commit b0642fb

Browse files
author
Julien Pivotto
authored
Merge pull request prometheus#8444 from prometheus/upgrade_golangci-lint-1.36.0
Update golangci-lint to 1.36.0
2 parents 6368227 + 75d86c6 commit b0642fb

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

Makefile.common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
8383

8484
GOLANGCI_LINT :=
8585
GOLANGCI_LINT_OPTS ?=
86-
GOLANGCI_LINT_VERSION ?= v1.18.0
86+
GOLANGCI_LINT_VERSION ?= v1.36.0
8787
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
8888
# windows isn't included here because of the path separator being different.
8989
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))

promql/engine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ func getPointSlice(sz int) []Point {
15711571
}
15721572

15731573
func putPointSlice(p []Point) {
1574-
//lint:ignore SA6002 relax staticcheck verification.
1574+
//nolint:staticcheck // Ignore SA6002 relax staticcheck verification.
15751575
pointPool.Put(p[:0])
15761576
}
15771577

tsdb/head.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ Outer:
551551
h.lastSeriesID.Store(s.Ref)
552552
}
553553
}
554-
//lint:ignore SA6002 relax staticcheck verification.
554+
//nolint:staticcheck // Ignore SA6002 relax staticcheck verification.
555555
seriesPool.Put(v)
556556
case []record.RefSample:
557557
samples := v
@@ -584,7 +584,7 @@ Outer:
584584
}
585585
samples = samples[m:]
586586
}
587-
//lint:ignore SA6002 relax staticcheck verification.
587+
//nolint:staticcheck // Ignore SA6002 relax staticcheck verification.
588588
samplesPool.Put(v)
589589
case []tombstones.Stone:
590590
for _, s := range v {
@@ -599,7 +599,7 @@ Outer:
599599
h.tombstones.AddInterval(s.Ref, itv)
600600
}
601601
}
602-
//lint:ignore SA6002 relax staticcheck verification.
602+
//nolint:staticcheck // Ignore SA6002 relax staticcheck verification.
603603
tstonesPool.Put(v)
604604
default:
605605
panic(fmt.Errorf("unexpected decoded type: %T", d))
@@ -1107,7 +1107,7 @@ func (h *Head) getAppendBuffer() []record.RefSample {
11071107
}
11081108

11091109
func (h *Head) putAppendBuffer(b []record.RefSample) {
1110-
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
1110+
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
11111111
h.appendPool.Put(b[:0])
11121112
}
11131113

@@ -1120,7 +1120,7 @@ func (h *Head) getSeriesBuffer() []*memSeries {
11201120
}
11211121

11221122
func (h *Head) putSeriesBuffer(b []*memSeries) {
1123-
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
1123+
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
11241124
h.seriesPool.Put(b[:0])
11251125
}
11261126

@@ -1133,7 +1133,7 @@ func (h *Head) getBytesBuffer() []byte {
11331133
}
11341134

11351135
func (h *Head) putBytesBuffer(b []byte) {
1136-
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
1136+
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
11371137
h.bytesPool.Put(b[:0])
11381138
}
11391139

tsdb/wal.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -890,19 +890,19 @@ func (r *walReader) Read(
890890
if seriesf != nil {
891891
seriesf(v)
892892
}
893-
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
893+
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
894894
seriesPool.Put(v[:0])
895895
case []record.RefSample:
896896
if samplesf != nil {
897897
samplesf(v)
898898
}
899-
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
899+
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
900900
samplePool.Put(v[:0])
901901
case []tombstones.Stone:
902902
if deletesf != nil {
903903
deletesf(v)
904904
}
905-
//lint:ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
905+
//nolint:staticcheck // Ignore SA6002 safe to ignore and actually fixing it has some performance penalty.
906906
deletePool.Put(v[:0])
907907
default:
908908
level.Error(r.logger).Log("msg", "unexpected data type")

0 commit comments

Comments
 (0)