mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
golangci: add import order check
Signed-off-by: demoManito <1430482733@qq.com>
This commit is contained in:
parent
d379e6221e
commit
0a08fa2b43
@ -20,14 +20,17 @@ linters:
|
|||||||
# - deadcode
|
# - deadcode
|
||||||
# - structcheck
|
# - structcheck
|
||||||
# - varcheck
|
# - varcheck
|
||||||
|
- goimports
|
||||||
- ineffassign
|
- ineffassign
|
||||||
|
- revive
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- stylecheck
|
- stylecheck
|
||||||
- unused
|
- unused
|
||||||
- unconvert # Remove unnecessary type conversions
|
- unconvert # Remove unnecessary type conversions
|
||||||
- revive
|
|
||||||
|
|
||||||
linters-settings: # please keep this alphabetized
|
linters-settings: # please keep this alphabetized
|
||||||
|
goimports:
|
||||||
|
local-prefixes: go.etcd.io/etcd # Put imports beginning with prefix after 3rd-party packages.
|
||||||
staticcheck:
|
staticcheck:
|
||||||
checks:
|
checks:
|
||||||
- "all"
|
- "all"
|
||||||
|
@ -22,9 +22,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/bgentry/speakeasy"
|
"github.com/bgentry/speakeasy"
|
||||||
|
"google.golang.org/grpc/grpclog"
|
||||||
|
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
"go.etcd.io/etcd/pkg/v3/report"
|
"go.etcd.io/etcd/pkg/v3/report"
|
||||||
"google.golang.org/grpc/grpclog"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -21,12 +21,12 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"go.etcd.io/etcd/client/v3"
|
|
||||||
"go.etcd.io/etcd/pkg/v3/report"
|
|
||||||
|
|
||||||
"github.com/cheggaaa/pb/v3"
|
"github.com/cheggaaa/pb/v3"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"golang.org/x/time/rate"
|
"golang.org/x/time/rate"
|
||||||
|
|
||||||
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
|
"go.etcd.io/etcd/pkg/v3/report"
|
||||||
)
|
)
|
||||||
|
|
||||||
// watchLatencyCmd represents the watch latency command
|
// watchLatencyCmd represents the watch latency command
|
||||||
|
@ -19,15 +19,14 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"go.etcd.io/etcd/api/v3/authpb"
|
bolt "go.etcd.io/bbolt"
|
||||||
"go.etcd.io/etcd/server/v3/storage/schema"
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
|
||||||
|
"go.etcd.io/etcd/api/v3/authpb"
|
||||||
"go.etcd.io/etcd/api/v3/mvccpb"
|
"go.etcd.io/etcd/api/v3/mvccpb"
|
||||||
"go.etcd.io/etcd/server/v3/lease/leasepb"
|
"go.etcd.io/etcd/server/v3/lease/leasepb"
|
||||||
"go.etcd.io/etcd/server/v3/storage/backend"
|
"go.etcd.io/etcd/server/v3/storage/backend"
|
||||||
|
"go.etcd.io/etcd/server/v3/storage/schema"
|
||||||
bolt "go.etcd.io/bbolt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func snapDir(dataDir string) string {
|
func snapDir(dataDir string) string {
|
||||||
|
@ -23,13 +23,14 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"go.uber.org/zap/zaptest"
|
||||||
|
|
||||||
"go.etcd.io/etcd/api/v3/authpb"
|
"go.etcd.io/etcd/api/v3/authpb"
|
||||||
"go.etcd.io/etcd/api/v3/etcdserverpb"
|
"go.etcd.io/etcd/api/v3/etcdserverpb"
|
||||||
"go.etcd.io/etcd/client/pkg/v3/fileutil"
|
"go.etcd.io/etcd/client/pkg/v3/fileutil"
|
||||||
"go.etcd.io/etcd/pkg/v3/pbutil"
|
"go.etcd.io/etcd/pkg/v3/pbutil"
|
||||||
"go.etcd.io/etcd/raft/v3/raftpb"
|
"go.etcd.io/etcd/raft/v3/raftpb"
|
||||||
"go.etcd.io/etcd/server/v3/storage/wal"
|
"go.etcd.io/etcd/server/v3/storage/wal"
|
||||||
"go.uber.org/zap/zaptest"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestEtcdDumpLogEntryType(t *testing.T) {
|
func TestEtcdDumpLogEntryType(t *testing.T) {
|
||||||
|
@ -29,6 +29,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"go.uber.org/zap"
|
||||||
|
|
||||||
"go.etcd.io/etcd/api/v3/etcdserverpb"
|
"go.etcd.io/etcd/api/v3/etcdserverpb"
|
||||||
"go.etcd.io/etcd/client/pkg/v3/types"
|
"go.etcd.io/etcd/client/pkg/v3/types"
|
||||||
"go.etcd.io/etcd/pkg/v3/pbutil"
|
"go.etcd.io/etcd/pkg/v3/pbutil"
|
||||||
@ -36,7 +38,6 @@ import (
|
|||||||
"go.etcd.io/etcd/server/v3/etcdserver/api/snap"
|
"go.etcd.io/etcd/server/v3/etcdserver/api/snap"
|
||||||
"go.etcd.io/etcd/server/v3/storage/wal"
|
"go.etcd.io/etcd/server/v3/storage/wal"
|
||||||
"go.etcd.io/etcd/server/v3/storage/wal/walpb"
|
"go.etcd.io/etcd/server/v3/storage/wal/walpb"
|
||||||
"go.uber.org/zap"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -21,10 +21,10 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/coreos/go-semver/semver"
|
"github.com/coreos/go-semver/semver"
|
||||||
"go.etcd.io/etcd/server/v3/storage/wal"
|
|
||||||
|
|
||||||
"google.golang.org/protobuf/reflect/protoreflect"
|
"google.golang.org/protobuf/reflect/protoreflect"
|
||||||
"google.golang.org/protobuf/reflect/protoregistry"
|
"google.golang.org/protobuf/reflect/protoregistry"
|
||||||
|
|
||||||
|
"go.etcd.io/etcd/server/v3/storage/wal"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user