From 87c727e95753888050daf108054aa5d4fbf86e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gy=C3=B6rgy=20Krajcsovits?= Date: Fri, 28 Apr 2023 16:32:42 +0200 Subject: [PATCH] Fix linter errors in Grafana additions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: György Krajcsovits --- tsdb/chunks/head_chunks_test.go | 4 ++-- tsdb/postings_for_matchers_cache_test.go | 4 ++-- tsdb/symbols_batch.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tsdb/chunks/head_chunks_test.go b/tsdb/chunks/head_chunks_test.go index 2c18c3b3a7..a4b229c15b 100644 --- a/tsdb/chunks/head_chunks_test.go +++ b/tsdb/chunks/head_chunks_test.go @@ -552,10 +552,10 @@ func randomChunk(t *testing.T) chunkenc.Chunk { func randomUnsupportedChunk(t *testing.T) chunkenc.Chunk { chunk := newUnsupportedChunk() - len := rand.Int() % 120 + length := rand.Int() % 120 app, err := chunk.Appender() require.NoError(t, err) - for i := 0; i < len; i++ { + for i := 0; i < length; i++ { app.Append(rand.Int63(), rand.Float64()) } return chunk diff --git a/tsdb/postings_for_matchers_cache_test.go b/tsdb/postings_for_matchers_cache_test.go index 8d238df60b..819183c5eb 100644 --- a/tsdb/postings_for_matchers_cache_test.go +++ b/tsdb/postings_for_matchers_cache_test.go @@ -261,11 +261,11 @@ func TestPostingsForMatchersCache(t *testing.T) { type indexForPostingsMock struct{} -func (idx indexForPostingsMock) LabelValues(name string, matchers ...*labels.Matcher) ([]string, error) { +func (idx indexForPostingsMock) LabelValues(string, ...*labels.Matcher) ([]string, error) { panic("implement me") } -func (idx indexForPostingsMock) Postings(name string, values ...string) (index.Postings, error) { +func (idx indexForPostingsMock) Postings(string, ...string) (index.Postings, error) { panic("implement me") } diff --git a/tsdb/symbols_batch.go b/tsdb/symbols_batch.go index 18cf798579..13fe84f907 100644 --- a/tsdb/symbols_batch.go +++ b/tsdb/symbols_batch.go @@ -99,7 +99,7 @@ func (f *symbolFlushers) loop() { } } - for range f.jobs { + for range f.jobs { //nolint:revive // This "empty" block is intentional // drain the channel, don't do more flushing. only used when error occurs. } }