From 3ce96a9ca9e5858b18ed55e4069fec82eae3e1e5 Mon Sep 17 00:00:00 2001 From: Kaviraj Kanagaraj Date: Tue, 30 Jul 2024 11:52:52 +0200 Subject: [PATCH] chore(lint-error): remove unused `stepCount` in `engine.go` This may block any PRs to merge because it causes following failure in CI checks ``` INFO [runner] linters took 59.237147569s with stages: goanalysis_metalinter: 58.68919861s pkg/logql/engine.go:449:3: ineffectual assignment to stepCount (ineffassign) stepCount = 1 ^ ``` This PR removes the unused `stepCount` Signed-off-by: Kaviraj Kanagaraj --- pkg/logql/engine.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/logql/engine.go b/pkg/logql/engine.go index 294fe81457de2..23c3073fb7284 100644 --- a/pkg/logql/engine.go +++ b/pkg/logql/engine.go @@ -5,7 +5,6 @@ import ( "errors" "flag" "fmt" - "math" "sort" "strconv" "strings" @@ -444,11 +443,6 @@ func (q *query) JoinSampleVector(next bool, r StepResult, stepEvaluator StepEval return vec, nil } - stepCount := int(math.Ceil(float64(q.params.End().Sub(q.params.Start()).Nanoseconds()) / float64(q.params.Step().Nanoseconds()))) - if stepCount <= 0 { - stepCount = 1 - } - for next { vec = r.SampleVector() vectorsToSeries(vec, seriesIndex)