Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.6 (forgejo) (#7118)

Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
This commit is contained in:
Renovate Bot 2025-03-04 21:38:35 +00:00 committed by forgejo-renovate-action
parent bb0e26a7b4
commit 6b436955fc
97 changed files with 258 additions and 345 deletions

View file

@ -18,7 +18,7 @@ func testQueueBasic(t *testing.T, newFn func(cfg *BaseConfig) (baseQueue, error)
q, err := newFn(cfg)
require.NoError(t, err)
ctx := context.Background()
ctx := t.Context()
_ = q.RemoveAll(ctx)
cnt, err := q.Len(ctx)
require.NoError(t, err)
@ -122,7 +122,7 @@ func TestBaseDummy(t *testing.T) {
q, err := newBaseDummy(&BaseConfig{}, true)
require.NoError(t, err)
ctx := context.Background()
ctx := t.Context()
require.NoError(t, q.PushItem(ctx, []byte("foo")))
cnt, err := q.Len(ctx)

View file

@ -4,7 +4,6 @@
package queue
import (
"context"
"path/filepath"
"testing"
@ -81,7 +80,7 @@ MAX_WORKERS = 123
require.NoError(t, err)
q1 := createWorkerPoolQueue[string](context.Background(), "no-such", cfgProvider, nil, false)
q1 := createWorkerPoolQueue[string](t.Context(), "no-such", cfgProvider, nil, false)
assert.Equal(t, "no-such", q1.GetName())
assert.Equal(t, "dummy", q1.GetType()) // no handler, so it becomes dummy
assert.Equal(t, filepath.Join(setting.AppDataPath, "queues/dir1"), q1.baseConfig.DataFullDir)
@ -97,7 +96,7 @@ MAX_WORKERS = 123
assert.Equal(t, "string", q1.GetItemTypeName())
qid1 := GetManager().qidCounter
q2 := createWorkerPoolQueue(context.Background(), "sub", cfgProvider, func(s ...int) (unhandled []int) { return nil }, false)
q2 := createWorkerPoolQueue(t.Context(), "sub", cfgProvider, func(s ...int) (unhandled []int) { return nil }, false)
assert.Equal(t, "sub", q2.GetName())
assert.Equal(t, "level", q2.GetType())
assert.Equal(t, filepath.Join(setting.AppDataPath, "queues/dir2"), q2.baseConfig.DataFullDir)
@ -119,7 +118,7 @@ MAX_WORKERS = 123
assert.Equal(t, 120, q1.workerMaxNum)
stop := runWorkerPoolQueue(q2)
require.NoError(t, GetManager().GetManagedQueue(qid2).FlushWithContext(context.Background(), 0))
require.NoError(t, GetManager().FlushAll(context.Background(), 0))
require.NoError(t, GetManager().GetManagedQueue(qid2).FlushWithContext(t.Context(), 0))
require.NoError(t, GetManager().FlushAll(t.Context(), 0))
stop()
}

View file

@ -5,7 +5,6 @@ package queue
import (
"bytes"
"context"
"runtime"
"strconv"
"sync"
@ -59,7 +58,7 @@ func TestWorkerPoolQueueUnhandled(t *testing.T) {
testRecorder.Record("push:%v", i)
require.NoError(t, q.Push(i))
}
require.NoError(t, q.FlushWithContext(context.Background(), 0))
require.NoError(t, q.FlushWithContext(t.Context(), 0))
stop()
ok := true
@ -167,7 +166,7 @@ func testWorkerPoolQueuePersistence(t *testing.T, queueSetting setting.QueueSett
q, _ := newWorkerPoolQueueForTest("pr_patch_checker_test", queueSetting, testHandler, true)
stop := runWorkerPoolQueue(q)
require.NoError(t, q.FlushWithContext(context.Background(), 0))
require.NoError(t, q.FlushWithContext(t.Context(), 0))
stop()
}