From cd88f7d1722062217d970d1db2ba70066af322a9 Mon Sep 17 00:00:00 2001 From: Youngtaek Yoon Date: Wed, 27 Mar 2024 09:20:52 +0000 Subject: [PATCH] Lint --- .golangci.yml | 1 + app/encoding.go | 3 ++- app/upgrades.go | 8 ++++---- app/upgrades/noop/upgrades.go | 4 ++-- app/upgrades/v050/upgrades.go | 4 ++-- cmd/fnsad/commands.go | 3 ++- cmd/fnsad/main.go | 4 ++-- cmd/fnsad/root.go | 5 +++-- cmd/fnsad/testnet.go | 3 ++- 9 files changed, 20 insertions(+), 15 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index c7c0f7ee..1f96d153 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -78,6 +78,7 @@ linters-settings: - prefix(github.com/cosmos/ibc-go) - prefix(github.com/CosmWasm/wasmd) - prefix(github.com/Finschia/finschia-sdk) + - prefix(github.com/Finschia/finschia) run: # default concurrency is a available CPU number diff --git a/app/encoding.go b/app/encoding.go index 6de391c6..41059b62 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -3,7 +3,6 @@ package app import ( "testing" - "github.com/Finschia/finschia/v3/app/params" dbm "github.com/cosmos/cosmos-db" "cosmossdk.io/log" @@ -11,6 +10,8 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + + "github.com/Finschia/finschia/v3/app/params" ) // MakeEncodingConfig creates a new EncodingConfig with all modules registered. For testing only diff --git a/app/upgrades.go b/app/upgrades.go index 28dfd98a..17ecb2e8 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -3,10 +3,6 @@ package app import ( "fmt" - "github.com/Finschia/finschia/v3/app/upgrades" - "github.com/Finschia/finschia/v3/app/upgrades/noop" - v050 "github.com/Finschia/finschia/v3/app/upgrades/v050" - upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/baseapp" @@ -24,6 +20,10 @@ import ( v2 "github.com/CosmWasm/wasmd/x/wasm/migrations/v2" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + + "github.com/Finschia/finschia/v3/app/upgrades" + "github.com/Finschia/finschia/v3/app/upgrades/noop" + v050 "github.com/Finschia/finschia/v3/app/upgrades/v050" ) // Upgrades list of chain upgrades diff --git a/app/upgrades/noop/upgrades.go b/app/upgrades/noop/upgrades.go index f78e0a88..e6090419 100644 --- a/app/upgrades/noop/upgrades.go +++ b/app/upgrades/noop/upgrades.go @@ -3,12 +3,12 @@ package noop import ( "context" - "github.com/Finschia/finschia/v3/app/upgrades" - storetypes "cosmossdk.io/store/types" upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" + + "github.com/Finschia/finschia/v3/app/upgrades" ) // NewUpgrade constructor diff --git a/app/upgrades/v050/upgrades.go b/app/upgrades/v050/upgrades.go index 2fe15872..959b8472 100644 --- a/app/upgrades/v050/upgrades.go +++ b/app/upgrades/v050/upgrades.go @@ -3,13 +3,13 @@ package v050 import ( "context" - "github.com/Finschia/finschia/v3/app/upgrades" - storetypes "cosmossdk.io/store/types" circuittypes "cosmossdk.io/x/circuit/types" upgradetypes "cosmossdk.io/x/upgrade/types" "github.com/cosmos/cosmos-sdk/types/module" + + "github.com/Finschia/finschia/v3/app/upgrades" ) // UpgradeName defines the on-chain upgrade name diff --git a/cmd/fnsad/commands.go b/cmd/fnsad/commands.go index 58b8dffa..655f576a 100644 --- a/cmd/fnsad/commands.go +++ b/cmd/fnsad/commands.go @@ -5,7 +5,6 @@ import ( "io" "os" - "github.com/Finschia/finschia/v3/app" cmtcfg "github.com/cometbft/cometbft/config" dbm "github.com/cosmos/cosmos-db" "github.com/prometheus/client_golang/prometheus" @@ -39,6 +38,8 @@ import ( wasmcli "github.com/CosmWasm/wasmd/x/wasm/client/cli" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + + "github.com/Finschia/finschia/v3/app" ) // initCometBFTConfig helps to override default CometBFT Config values. diff --git a/cmd/fnsad/main.go b/cmd/fnsad/main.go index 71e33623..4e995758 100644 --- a/cmd/fnsad/main.go +++ b/cmd/fnsad/main.go @@ -3,11 +3,11 @@ package main import ( "os" - "github.com/Finschia/finschia/v3/app" - "cosmossdk.io/log" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + + "github.com/Finschia/finschia/v3/app" ) func main() { diff --git a/cmd/fnsad/root.go b/cmd/fnsad/root.go index 9a972124..ea515058 100644 --- a/cmd/fnsad/root.go +++ b/cmd/fnsad/root.go @@ -3,8 +3,6 @@ package main import ( "os" - "github.com/Finschia/finschia/v3/app" - "github.com/Finschia/finschia/v3/app/params" dbm "github.com/cosmos/cosmos-db" "github.com/spf13/cobra" @@ -24,6 +22,9 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + + "github.com/Finschia/finschia/v3/app" + "github.com/Finschia/finschia/v3/app/params" ) // NewRootCmd creates a new root command for wasmd. It is called once in the diff --git a/cmd/fnsad/testnet.go b/cmd/fnsad/testnet.go index dead7bd8..9106eca4 100644 --- a/cmd/fnsad/testnet.go +++ b/cmd/fnsad/testnet.go @@ -11,7 +11,6 @@ import ( "path/filepath" "time" - "github.com/Finschia/finschia/v3/app" cmtconfig "github.com/cometbft/cometbft/config" cmttime "github.com/cometbft/cometbft/types/time" "github.com/spf13/cobra" @@ -39,6 +38,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + "github.com/Finschia/finschia/v3/app" ) var (