style: add gci linter (#16605)
This commit is contained in:
Vendored
+2
-2
@@ -3,10 +3,10 @@ package cache
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
lru "github.com/hashicorp/golang-lru"
|
||||
|
||||
"cosmossdk.io/store/cachekv"
|
||||
"cosmossdk.io/store/types"
|
||||
|
||||
lru "github.com/hashicorp/golang-lru"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -4,11 +4,12 @@ import (
|
||||
fmt "fmt"
|
||||
"testing"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/store/cachekv"
|
||||
"cosmossdk.io/store/dbadapter"
|
||||
"cosmossdk.io/store/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func DoBenchmarkDeepCacheStack(b *testing.B, depth int) {
|
||||
|
||||
@@ -4,8 +4,9 @@ import (
|
||||
"bytes"
|
||||
"errors"
|
||||
|
||||
"cosmossdk.io/store/types"
|
||||
"github.com/tidwall/btree"
|
||||
|
||||
"cosmossdk.io/store/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -3,8 +3,9 @@ package internal
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/store/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/store/types"
|
||||
)
|
||||
|
||||
func TestGetSetDelete(t *testing.T) {
|
||||
|
||||
@@ -4,8 +4,9 @@ import (
|
||||
"bytes"
|
||||
"errors"
|
||||
|
||||
"cosmossdk.io/store/types"
|
||||
"github.com/tidwall/btree"
|
||||
|
||||
"cosmossdk.io/store/types"
|
||||
)
|
||||
|
||||
var _ types.Iterator = (*memIterator)(nil)
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"sort"
|
||||
"sync"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
"cosmossdk.io/store/cachekv/internal"
|
||||
"cosmossdk.io/store/internal/conv"
|
||||
"cosmossdk.io/store/internal/kv"
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/math/unsafe"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/math/unsafe"
|
||||
"cosmossdk.io/store/cachekv"
|
||||
"cosmossdk.io/store/dbadapter"
|
||||
"cosmossdk.io/store/types"
|
||||
|
||||
@@ -5,13 +5,13 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/store/cachekv"
|
||||
"cosmossdk.io/store/dbadapter"
|
||||
"cosmossdk.io/store/mock"
|
||||
"cosmossdk.io/store/types"
|
||||
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
var errFoo = errors.New("dummy")
|
||||
|
||||
@@ -7,11 +7,11 @@ import (
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/cosmos/iavl"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/cachekv"
|
||||
"cosmossdk.io/store/internal/kv"
|
||||
"cosmossdk.io/store/metrics"
|
||||
|
||||
+2
-1
@@ -3,8 +3,9 @@ package iavl
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"cosmossdk.io/store/types"
|
||||
"github.com/cosmos/iavl"
|
||||
|
||||
"cosmossdk.io/store/types"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -3,10 +3,11 @@ package iavl
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/cosmos/iavl"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
)
|
||||
|
||||
func TestImmutableTreePanics(t *testing.T) {
|
||||
|
||||
@@ -3,10 +3,10 @@ package proofs
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"cosmossdk.io/math/unsafe"
|
||||
cmtprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"cosmossdk.io/math/unsafe"
|
||||
sdkmaps "cosmossdk.io/store/internal/maps"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,15 +4,14 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/store/dbadapter"
|
||||
"cosmossdk.io/store/internal/kv"
|
||||
"cosmossdk.io/store/listenkv"
|
||||
"cosmossdk.io/store/prefix"
|
||||
"cosmossdk.io/store/types"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
)
|
||||
|
||||
func bz(s string) []byte { return []byte(s) }
|
||||
|
||||
@@ -3,12 +3,11 @@ package mem_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/store/cachekv"
|
||||
pruningtypes "cosmossdk.io/store/pruning/types"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/store/cachekv"
|
||||
"cosmossdk.io/store/mem"
|
||||
pruningtypes "cosmossdk.io/store/pruning/types"
|
||||
"cosmossdk.io/store/types"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,14 +4,12 @@ import (
|
||||
"crypto/rand"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/store/cachekv"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
tiavl "github.com/cosmos/iavl"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
tiavl "github.com/cosmos/iavl"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/cachekv"
|
||||
"cosmossdk.io/store/dbadapter"
|
||||
"cosmossdk.io/store/gaskv"
|
||||
"cosmossdk.io/store/iavl"
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"sort"
|
||||
"sync"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/pruning/types"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
db "github.com/cosmos/cosmos-db"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/mock"
|
||||
"cosmossdk.io/store/pruning"
|
||||
"cosmossdk.io/store/pruning/types"
|
||||
|
||||
@@ -2,9 +2,8 @@ package rootmulti
|
||||
|
||||
import (
|
||||
"cosmossdk.io/store/dbadapter"
|
||||
"cosmossdk.io/store/types"
|
||||
|
||||
pruningtypes "cosmossdk.io/store/pruning/types"
|
||||
"cosmossdk.io/store/types"
|
||||
)
|
||||
|
||||
var commithash = []byte("FAKE_HASH")
|
||||
|
||||
@@ -3,12 +3,13 @@ package rootmulti
|
||||
import (
|
||||
"testing"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/iavl"
|
||||
"cosmossdk.io/store/metrics"
|
||||
"cosmossdk.io/store/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestVerifyIAVLStoreQueryProof(t *testing.T) {
|
||||
|
||||
@@ -10,17 +10,17 @@ import (
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/iavl"
|
||||
"cosmossdk.io/store/metrics"
|
||||
"cosmossdk.io/store/rootmulti"
|
||||
"cosmossdk.io/store/snapshots"
|
||||
snapshottypes "cosmossdk.io/store/snapshots/types"
|
||||
"cosmossdk.io/store/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
)
|
||||
|
||||
func newMultiStoreWithGeneratedData(db dbm.DB, stores uint8, storeKeys uint64) *rootmulti.Store {
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
protoio "github.com/cosmos/gogoproto/io"
|
||||
@@ -17,6 +16,7 @@ import (
|
||||
iavltree "github.com/cosmos/iavl"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/cachemulti"
|
||||
"cosmossdk.io/store/dbadapter"
|
||||
"cosmossdk.io/store/iavl"
|
||||
|
||||
@@ -6,11 +6,11 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/errors"
|
||||
"cosmossdk.io/log"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/errors"
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/cachemulti"
|
||||
"cosmossdk.io/store/iavl"
|
||||
sdkmaps "cosmossdk.io/store/internal/maps"
|
||||
|
||||
@@ -11,12 +11,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
db "github.com/cosmos/cosmos-db"
|
||||
protoio "github.com/cosmos/gogoproto/io"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/snapshots"
|
||||
snapshottypes "cosmossdk.io/store/snapshots/types"
|
||||
"cosmossdk.io/store/types"
|
||||
|
||||
@@ -11,9 +11,8 @@ import (
|
||||
"sort"
|
||||
"sync"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/snapshots/types"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
)
|
||||
|
||||
@@ -5,9 +5,10 @@ import (
|
||||
"compress/zlib"
|
||||
"io"
|
||||
|
||||
"cosmossdk.io/errors"
|
||||
protoio "github.com/cosmos/gogoproto/io"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
"cosmossdk.io/errors"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"cosmossdk.io/errors"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
proto "github.com/cosmos/gogoproto/proto"
|
||||
|
||||
"cosmossdk.io/errors"
|
||||
)
|
||||
|
||||
// Converts an ABCI snapshot to a snapshot. Mainly to decode the SDK metadata.
|
||||
|
||||
@@ -8,16 +8,15 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"github.com/cosmos/gogoproto/proto"
|
||||
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
)
|
||||
|
||||
type PluginTestSuite struct {
|
||||
|
||||
@@ -6,7 +6,6 @@ import (
|
||||
"io"
|
||||
|
||||
"cosmossdk.io/errors"
|
||||
|
||||
"cosmossdk.io/store/types"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,9 +6,8 @@ import (
|
||||
"io"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/store/dbadapter"
|
||||
"cosmossdk.io/store/internal/kv"
|
||||
|
||||
@@ -3,10 +3,10 @@ package types_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
dbm "github.com/cosmos/cosmos-db"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/store/iavl"
|
||||
"cosmossdk.io/store/metrics"
|
||||
"cosmossdk.io/store/types"
|
||||
|
||||
Reference in New Issue
Block a user