Skip to content

Commit

Permalink
fix new linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
twmb committed Apr 30, 2024
1 parent 142b2e2 commit a4f259a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# We may as well allow multiple golangci-lint invocations at once.
run:
allow-parallel-runners: true
go: "1.21"
go: "1.22"

# golangci-lint by default ignores some staticcheck and vet raised issues that
# are actually important to catch. The following ensures that we do not ignore
Expand Down Expand Up @@ -68,7 +68,6 @@ linters-settings:
#
# https://github.com/mvdan/gofumpt/issues/137
gofumpt:
lang-version: "1.21"
extra-rules: true

gosec:
Expand Down Expand Up @@ -163,5 +162,4 @@ linters-settings:
# contexts for beneficial reasons, and we disable the SSLv3 deprecation
# warning because this is solely for a debug log.
staticcheck:
go: "1.21"
checks: ["all", "-SA1012", "-SA1019"]
2 changes: 1 addition & 1 deletion pkg/kgo/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ func (c *consumer) assignPartitions(assignments map[string]map[int32]Offset, how
case assignPurgeMatching:
// This is slightly different than invalidate in that
// we invalidate whole topics.
loadOffsets.keepFilter(func(t string, p int32) bool {
loadOffsets.keepFilter(func(t string, _ int32) bool {
_, ok := assignments[t]
return !ok // assignments are topics to purge -- do NOT keep the topic if it is being purged
})
Expand Down
4 changes: 2 additions & 2 deletions pkg/kgo/consumer_direct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func TestPauseIssue489(t *testing.T) {
r := StringRecord("v")
r.Partition = int32(which % 3)
which++
cl.Produce(ctx, r, func(r *Record, err error) {
cl.Produce(ctx, r, func(_ *Record, err error) {
if err == context.Canceled {
exit.Store(true)
}
Expand Down Expand Up @@ -372,7 +372,7 @@ func TestPauseIssueOct2023(t *testing.T) {
r := StringRecord("v")
r.Topic = ts[which%len(ts)]
which++
cl.Produce(ctx, r, func(r *Record, err error) {
cl.Produce(ctx, r, func(_ *Record, err error) {
if err == context.Canceled {
exit.Store(true)
}
Expand Down

0 comments on commit a4f259a

Please sign in to comment.