From 22f377a858c2df857ebe370057dbcc22dc43c04c Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Fri, 20 Mar 2020 19:14:53 +0100 Subject: [PATCH] regenerate mocks, don't format autogenered files on make format (#5848) --- Makefile | 6 +++--- tests/mocks/account_retriever.go | 3 +-- tests/mocks/tendermint_tm_db_DB.go | 3 +-- tests/mocks/types_handler.go | 6 ++---- tests/mocks/types_invariant.go | 6 ++---- tests/mocks/types_module_module.go | 10 ++++------ tests/mocks/types_router.go | 6 ++---- 7 files changed, 15 insertions(+), 25 deletions(-) diff --git a/Makefile b/Makefile index 56eb4fa45..25ef7ea37 100644 --- a/Makefile +++ b/Makefile @@ -197,9 +197,9 @@ lint: .PHONY: lint format: - find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" -not -name '*.pb.go' | xargs gofmt -w -s - find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" -not -name '*.pb.go' | xargs misspell -w - find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" -not -name '*.pb.go' | xargs goimports -w -local github.com/cosmos/cosmos-sdk + find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs gofmt -w -s + find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs misspell -w + find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs goimports -w -local github.com/cosmos/cosmos-sdk .PHONY: format ############################################################################### diff --git a/tests/mocks/account_retriever.go b/tests/mocks/account_retriever.go index 5fa7807c8..a3086c77b 100644 --- a/tests/mocks/account_retriever.go +++ b/tests/mocks/account_retriever.go @@ -5,9 +5,8 @@ package mocks import ( - reflect "reflect" - gomock "github.com/golang/mock/gomock" + reflect "reflect" ) // MockNodeQuerier is a mock of NodeQuerier interface diff --git a/tests/mocks/tendermint_tm_db_DB.go b/tests/mocks/tendermint_tm_db_DB.go index ccfc26909..bed59a498 100644 --- a/tests/mocks/tendermint_tm_db_DB.go +++ b/tests/mocks/tendermint_tm_db_DB.go @@ -5,10 +5,9 @@ package mocks import ( - reflect "reflect" - gomock "github.com/golang/mock/gomock" tm_db "github.com/tendermint/tm-db" + reflect "reflect" ) // MockDB is a mock of DB interface diff --git a/tests/mocks/types_handler.go b/tests/mocks/types_handler.go index c16f5d595..da80614ae 100644 --- a/tests/mocks/types_handler.go +++ b/tests/mocks/types_handler.go @@ -5,11 +5,9 @@ package mocks import ( - reflect "reflect" - - gomock "github.com/golang/mock/gomock" - types "github.com/cosmos/cosmos-sdk/types" + gomock "github.com/golang/mock/gomock" + reflect "reflect" ) // MockAnteDecorator is a mock of AnteDecorator interface diff --git a/tests/mocks/types_invariant.go b/tests/mocks/types_invariant.go index 974099c52..325b108b2 100644 --- a/tests/mocks/types_invariant.go +++ b/tests/mocks/types_invariant.go @@ -5,11 +5,9 @@ package mocks import ( - reflect "reflect" - - gomock "github.com/golang/mock/gomock" - types "github.com/cosmos/cosmos-sdk/types" + gomock "github.com/golang/mock/gomock" + reflect "reflect" ) // MockInvariantRegistry is a mock of InvariantRegistry interface diff --git a/tests/mocks/types_module_module.go b/tests/mocks/types_module_module.go index 94fcc2384..274ac5c06 100644 --- a/tests/mocks/types_module_module.go +++ b/tests/mocks/types_module_module.go @@ -6,16 +6,14 @@ package mocks import ( json "encoding/json" - reflect "reflect" - + context "github.com/cosmos/cosmos-sdk/client/context" + codec "github.com/cosmos/cosmos-sdk/codec" + types "github.com/cosmos/cosmos-sdk/types" gomock "github.com/golang/mock/gomock" mux "github.com/gorilla/mux" cobra "github.com/spf13/cobra" types0 "github.com/tendermint/tendermint/abci/types" - - context "github.com/cosmos/cosmos-sdk/client/context" - codec "github.com/cosmos/cosmos-sdk/codec" - types "github.com/cosmos/cosmos-sdk/types" + reflect "reflect" ) // MockAppModuleBasic is a mock of AppModuleBasic interface diff --git a/tests/mocks/types_router.go b/tests/mocks/types_router.go index 5a73d5c90..924d95146 100644 --- a/tests/mocks/types_router.go +++ b/tests/mocks/types_router.go @@ -5,11 +5,9 @@ package mocks import ( - reflect "reflect" - - gomock "github.com/golang/mock/gomock" - types "github.com/cosmos/cosmos-sdk/types" + gomock "github.com/golang/mock/gomock" + reflect "reflect" ) // MockRouter is a mock of Router interface