Skip to content

Commit

Permalink
fix(ci): update ignore directives for staticcheck
Browse files Browse the repository at this point in the history
Switch golangci-lint nolint:unused to staticcheck lint:ignore style

Signed-off-by: Dominic Evans <[email protected]>
  • Loading branch information
dnwe committed Feb 3, 2025
1 parent b32d5fc commit b3aef99
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions balance_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ func (p *partitionMovements) getTheActualPartitionToBeMoved(partition topicParti
return reversePairPartition
}

//nolint:unused // this is used but only in unittests as a helper (which are excluded by the integration build tag)
//lint:ignore U1000 // this is used but only in unittests as a helper (which are excluded by the integration build tag)
func (p *partitionMovements) isLinked(src, dst string, pairs []consumerPair, currentPath []string) ([]string, bool) {
if src == dst {
return currentPath, false
Expand Down Expand Up @@ -1024,7 +1024,7 @@ func (p *partitionMovements) isLinked(src, dst string, pairs []consumerPair, cur
return currentPath, false
}

//nolint:unused // this is used but only in unittests as a helper (which are excluded by the integration build tag)
//lint:ignore U1000 // this is used but only in unittests as a helper (which are excluded by the integration build tag)
func (p *partitionMovements) in(cycle []string, cycles [][]string) bool {
superCycle := make([]string, len(cycle)-1)
for i := 0; i < len(cycle)-1; i++ {
Expand All @@ -1039,7 +1039,7 @@ func (p *partitionMovements) in(cycle []string, cycles [][]string) bool {
return false
}

//nolint:unused // this is used but only in unittests as a helper (which are excluded by the integration build tag)
//lint:ignore U1000 // this is used but only in unittests as a helper (which are excluded by the integration build tag)
func (p *partitionMovements) hasCycles(pairs []consumerPair) bool {
cycles := make([][]string, 0)
for _, pair := range pairs {
Expand Down Expand Up @@ -1071,7 +1071,7 @@ func (p *partitionMovements) hasCycles(pairs []consumerPair) bool {
return false
}

//nolint:unused // this is used but only in unittests as a helper (which are excluded by the integration build tag)
//lint:ignore U1000 // this is used but only in unittests as a helper (which are excluded by the integration build tag)
func (p *partitionMovements) isSticky() bool {
for topic, movements := range p.PartitionMovementsByTopic {
movementPairs := make([]consumerPair, len(movements))
Expand All @@ -1089,7 +1089,7 @@ func (p *partitionMovements) isSticky() bool {
return true
}

//nolint:unused // this is used but only in unittests as a helper (which are excluded by the integration build tag)
//lint:ignore U1000 // this is used but only in unittests as a helper (which are excluded by the integration build tag)
func indexOfSubList(source []string, target []string) int {
targetSize := len(target)
maxCandidate := len(source) - targetSize
Expand Down
2 changes: 1 addition & 1 deletion metrics_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func minCountHistogramValidator(name string, minCount int) *metricValidator {
})
}

//nolint:unused // this is used but only in unittests which are excluded by the integration build tag
//lint:ignore U1000 // this is used but only in unittests which are excluded by the integration build tag
func minMaxHistogramValidator(name string, expectedMin int, expectedMax int) *metricValidator {
return histogramValidator(name, func(t *testing.T, histogram metrics.Histogram) {
t.Helper()
Expand Down

0 comments on commit b3aef99

Please sign in to comment.