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
|
||||
# - structcheck
|
||||
# - varcheck
|
||||
- goimports
|
||||
- ineffassign
|
||||
- revive
|
||||
- staticcheck
|
||||
- stylecheck
|
||||
- unused
|
||||
- unconvert # Remove unnecessary type conversions
|
||||
- revive
|
||||
|
||||
linters-settings: # please keep this alphabetized
|
||||
goimports:
|
||||
local-prefixes: go.etcd.io/etcd # Put imports beginning with prefix after 3rd-party packages.
|
||||
staticcheck:
|
||||
checks:
|
||||
- "all"
|
||||
|
@ -22,9 +22,10 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/bgentry/speakeasy"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
|
||||
clientv3 "go.etcd.io/etcd/client/v3"
|
||||
"go.etcd.io/etcd/pkg/v3/report"
|
||||
"google.golang.org/grpc/grpclog"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -21,12 +21,12 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"go.etcd.io/etcd/client/v3"
|
||||
"go.etcd.io/etcd/pkg/v3/report"
|
||||
|
||||
"github.com/cheggaaa/pb/v3"
|
||||
"github.com/spf13/cobra"
|
||||
"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
|
||||
|
@ -19,15 +19,14 @@ import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
"go.etcd.io/etcd/api/v3/authpb"
|
||||
"go.etcd.io/etcd/server/v3/storage/schema"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"go.etcd.io/etcd/api/v3/authpb"
|
||||
"go.etcd.io/etcd/api/v3/mvccpb"
|
||||
"go.etcd.io/etcd/server/v3/lease/leasepb"
|
||||
"go.etcd.io/etcd/server/v3/storage/backend"
|
||||
|
||||
bolt "go.etcd.io/bbolt"
|
||||
"go.etcd.io/etcd/server/v3/storage/schema"
|
||||
)
|
||||
|
||||
func snapDir(dataDir string) string {
|
||||
|
@ -23,13 +23,14 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"go.uber.org/zap/zaptest"
|
||||
|
||||
"go.etcd.io/etcd/api/v3/authpb"
|
||||
"go.etcd.io/etcd/api/v3/etcdserverpb"
|
||||
"go.etcd.io/etcd/client/pkg/v3/fileutil"
|
||||
"go.etcd.io/etcd/pkg/v3/pbutil"
|
||||
"go.etcd.io/etcd/raft/v3/raftpb"
|
||||
"go.etcd.io/etcd/server/v3/storage/wal"
|
||||
"go.uber.org/zap/zaptest"
|
||||
)
|
||||
|
||||
func TestEtcdDumpLogEntryType(t *testing.T) {
|
||||
|
@ -29,6 +29,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"go.etcd.io/etcd/api/v3/etcdserverpb"
|
||||
"go.etcd.io/etcd/client/pkg/v3/types"
|
||||
"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/storage/wal"
|
||||
"go.etcd.io/etcd/server/v3/storage/wal/walpb"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -21,10 +21,10 @@ import (
|
||||
"sort"
|
||||
|
||||
"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/protoregistry"
|
||||
|
||||
"go.etcd.io/etcd/server/v3/storage/wal"
|
||||
)
|
||||
|
||||
var (
|
||||
|
Loading…
x
Reference in New Issue
Block a user