diff --git a/indexer/postgres/tests/init_schema_test.go b/indexer/postgres/tests/init_schema_test.go index 1afa6caea9..8c4288ba34 100644 --- a/indexer/postgres/tests/init_schema_test.go +++ b/indexer/postgres/tests/init_schema_test.go @@ -9,9 +9,7 @@ import ( embeddedpostgres "github.com/fergusstrange/embedded-postgres" "github.com/hashicorp/consul/sdk/freeport" - - // this is where we get our pgx database driver from - _ "github.com/jackc/pgx/v5/stdlib" + _ "github.com/jackc/pgx/v5/stdlib" // this is where we get our pgx database driver from "github.com/stretchr/testify/require" "gotest.tools/v3/golden" diff --git a/schema/decoding/decoding_test.go b/schema/decoding/decoding_test.go index 988c1b5ea2..d4308390d2 100644 --- a/schema/decoding/decoding_test.go +++ b/schema/decoding/decoding_test.go @@ -68,7 +68,7 @@ func TestMiddleware_filtered(t *testing.T) { tl := newTestFixture(t) listener, err := Middleware(tl.Listener, tl.resolver, MiddlewareOptions{ ModuleFilter: func(moduleName string) bool { - return moduleName == "one" + return moduleName == "one" //nolint:goconst // adding constants for this would impede readability }, }) if err != nil { @@ -176,6 +176,7 @@ type testFixture struct { } func newTestFixture(t *testing.T) *testFixture { + t.Helper() res := &testFixture{} res.Listener = appdata.Listener{ InitializeModuleData: func(data appdata.ModuleInitializationData) error { @@ -246,7 +247,7 @@ func newTestMultiStore() *testMultiStore { var _ SyncSource = &testMultiStore{} -func (ms *testMultiStore) IterateAllKVPairs(moduleName string, fn func(key []byte, value []byte) error) error { +func (ms *testMultiStore) IterateAllKVPairs(moduleName string, fn func(key, value []byte) error) error { s, ok := ms.stores[moduleName] if !ok { return fmt.Errorf("don't have state for module %s", moduleName) @@ -267,6 +268,7 @@ func (ms *testMultiStore) IterateAllKVPairs(moduleName string, fn func(key []byt } func (ms *testMultiStore) newTestStore(t *testing.T, modName string) *testStore { + t.Helper() s := &testStore{ t: t, modName: modName, diff --git a/schema/decoding/resolver_test.go b/schema/decoding/resolver_test.go index d91197ac26..f5caf287ca 100644 --- a/schema/decoding/resolver_test.go +++ b/schema/decoding/resolver_test.go @@ -39,7 +39,6 @@ func TestModuleSetDecoderResolver_IterateAll(t *testing.T) { objectTypes[cdc.Schema.ObjectTypes[0].Name] = true return nil }) - if err != nil { t.Fatalf("unexpected error: %v", err) } diff --git a/schema/decoding/sync.go b/schema/decoding/sync.go index 19582cfa37..d8aee9884c 100644 --- a/schema/decoding/sync.go +++ b/schema/decoding/sync.go @@ -8,7 +8,6 @@ import ( // SyncSource is an interface that allows indexers to start indexing modules with pre-existing state. // It should generally be a wrapper around the key-value store. type SyncSource interface { - // IterateAllKVPairs iterates over all key-value pairs for a given module. IterateAllKVPairs(moduleName string, fn func(key, value []byte) error) error } diff --git a/x/accounts/defaults/lockup/continuous_locking_account_test.go b/x/accounts/defaults/lockup/continuous_locking_account_test.go index dd208b26be..cbccbb224e 100644 --- a/x/accounts/defaults/lockup/continuous_locking_account_test.go +++ b/x/accounts/defaults/lockup/continuous_locking_account_test.go @@ -19,7 +19,7 @@ import ( func setupContinousAccount(t *testing.T, ctx context.Context, ss store.KVStoreService) *ContinuousLockingAccount { t.Helper() deps := makeMockDependencies(ss) - owner := "owner" + owner := "owner" //nolint:goconst // adding constants for this would impede readability acc, err := NewContinuousLockingAccount(deps) require.NoError(t, err)