Skip to content

Commit

Permalink
chore: update changelog
Browse files Browse the repository at this point in the history
Signed-off-by: zemyblue <[email protected]>

# Conflicts:
#	CHANGELOG.md
  • Loading branch information
zemyblue committed Oct 24, 2023
2 parents c563d6d + b2de46c commit c770a86
Show file tree
Hide file tree
Showing 16 changed files with 97 additions and 61 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Check Make Format
# this workflow checks that go files is formated by `make format`
on:
pull_request:
push:
branches:
- main

jobs:
check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Display go version
run: go version
- uses: actions/cache@v3
id: cache
with:
path: ~/go/bin
key: ${{ runner.os }}-go-v1.20-misspell-v0.3.4-goimports-reviser-v3.4.5
- name: install misspell
if: steps.cache.outputs.cache-hit != 'true'
run: |
go install github.com/client9/misspell/cmd/[email protected]
- name: install goimports-reviser
if: steps.cache.outputs.cache-hit != 'true'
run: |
go install github.com/incu6us/goimports-reviser/[email protected]
- name: Make Format
run: make format
- name: Check Diff
run: git diff --exit-code
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Features

### Improvements
* (improvements) [\#230](https://github.com/Finschia/finschia/pull/230) fix Makefile for format and execute make format #230

### Bug Fixes

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ lint:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s

format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofmt -w -s
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs misspell -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs goimports -w -local github.com/Finschia/finschia-sdk
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" | xargs gofmt -w -s
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" | xargs misspell -w
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" | xargs -n1 goimports-reviser -rm-unused -set-alias -project-name "github.com/Finschia/finschia/" -company-prefixes "github.com/Finschia/"

.PHONY: lint format

Expand Down
5 changes: 3 additions & 2 deletions ante/ante.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package ante

import (
ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper"

sdk "github.com/Finschia/finschia-sdk/types"
sdkerrors "github.com/Finschia/finschia-sdk/types/errors"
"github.com/Finschia/finschia-sdk/x/auth/ante"
wasmkeeper "github.com/Finschia/wasmd/x/wasm/keeper"
wasmtypes "github.com/Finschia/wasmd/x/wasm/types"
ibcante "github.com/cosmos/ibc-go/v4/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand Down
5 changes: 3 additions & 2 deletions ante/ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import (
"fmt"
"testing"

"github.com/stretchr/testify/suite"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

"github.com/Finschia/finschia-sdk/client"
"github.com/Finschia/finschia-sdk/client/tx"
cryptotypes "github.com/Finschia/finschia-sdk/crypto/types"
Expand All @@ -13,8 +16,6 @@ import (
"github.com/Finschia/finschia-sdk/types/tx/signing"
xauthsigning "github.com/Finschia/finschia-sdk/x/auth/signing"
ocrand "github.com/Finschia/ostracon/libs/rand"
"github.com/stretchr/testify/suite"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"

linkapp "github.com/Finschia/finschia/v2/app"
linkhelpers "github.com/Finschia/finschia/v2/app/helpers"
Expand Down
40 changes: 19 additions & 21 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,24 @@ import (
"os"
"path/filepath"

ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts"
icahost "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host"
icahostkeeper "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/keeper"
icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types"
"github.com/cosmos/ibc-go/v4/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v4/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v4/modules/core"
ibcclient "github.com/cosmos/ibc-go/v4/modules/core/02-client"
ibcclientclient "github.com/cosmos/ibc-go/v4/modules/core/02-client/client"
ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types"
porttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper"
"github.com/gorilla/mux"
"github.com/rakyll/statik/fs"

ocabci "github.com/Finschia/ostracon/abci/types"
"github.com/Finschia/ostracon/libs/log"
ostos "github.com/Finschia/ostracon/libs/os"
abci "github.com/tendermint/tendermint/abci/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"
Expand Down Expand Up @@ -102,33 +114,19 @@ import (
upgradeclient "github.com/Finschia/finschia-sdk/x/upgrade/client"
upgradekeeper "github.com/Finschia/finschia-sdk/x/upgrade/keeper"
upgradetypes "github.com/Finschia/finschia-sdk/x/upgrade/types"
ocabci "github.com/Finschia/ostracon/abci/types"
"github.com/Finschia/ostracon/libs/log"
ostos "github.com/Finschia/ostracon/libs/os"
"github.com/Finschia/wasmd/x/wasm"
wasmclient "github.com/Finschia/wasmd/x/wasm/client"
wasmkeeper "github.com/Finschia/wasmd/x/wasm/keeper"
"github.com/Finschia/wasmd/x/wasmplus"
wasmpluskeeper "github.com/Finschia/wasmd/x/wasmplus/keeper"
wasmplustypes "github.com/Finschia/wasmd/x/wasmplus/types"
ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts"
icahost "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host"
icahostkeeper "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/keeper"
icahosttypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types"
"github.com/cosmos/ibc-go/v4/modules/apps/transfer"
ibctransferkeeper "github.com/cosmos/ibc-go/v4/modules/apps/transfer/keeper"
ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types"
ibc "github.com/cosmos/ibc-go/v4/modules/core"
ibcclient "github.com/cosmos/ibc-go/v4/modules/core/02-client"
ibcclientclient "github.com/cosmos/ibc-go/v4/modules/core/02-client/client"
ibcclienttypes "github.com/cosmos/ibc-go/v4/modules/core/02-client/types"
porttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types"
ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host"
ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper"

appante "github.com/Finschia/finschia/v2/ante"
appparams "github.com/Finschia/finschia/v2/app/params"

// unnamed import of statik for swagger UI support
_ "github.com/Finschia/finschia/v2/client/docs/statik"
_ "github.com/Finschia/finschia/v2/client/docs/statik" // unnamed import of statik for swagger UI support
)

const appName = "Finschia"
Expand Down
10 changes: 4 additions & 6 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"os"
"testing"

"github.com/cosmos/ibc-go/v4/modules/apps/transfer"
ibc "github.com/cosmos/ibc-go/v4/modules/core"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"

"github.com/Finschia/ostracon/libs/log"
abci "github.com/tendermint/tendermint/abci/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"
Expand All @@ -32,16 +32,14 @@ import (
foundationmodule "github.com/Finschia/finschia-sdk/x/foundation/module"
"github.com/Finschia/finschia-sdk/x/genutil"
"github.com/Finschia/finschia-sdk/x/gov"
"github.com/Finschia/wasmd/x/wasmplus"

"github.com/Finschia/finschia-sdk/x/mint"
"github.com/Finschia/finschia-sdk/x/params"
"github.com/Finschia/finschia-sdk/x/slashing"
"github.com/Finschia/finschia-sdk/x/staking"
tokenmodule "github.com/Finschia/finschia-sdk/x/token/module"
"github.com/Finschia/finschia-sdk/x/upgrade"
"github.com/cosmos/ibc-go/v4/modules/apps/transfer"
ibc "github.com/cosmos/ibc-go/v4/modules/core"
"github.com/Finschia/ostracon/libs/log"
"github.com/Finschia/wasmd/x/wasmplus"
)

func TestSimAppExportAndBlockedAddrs(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion app/genesis_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"testing"
"time"

"github.com/Finschia/ostracon/crypto"
"github.com/stretchr/testify/require"

"github.com/Finschia/finschia-sdk/crypto/keys/secp256k1"
"github.com/Finschia/finschia-sdk/simapp"
sdk "github.com/Finschia/finschia-sdk/types"
authtypes "github.com/Finschia/finschia-sdk/x/auth/types"
"github.com/Finschia/ostracon/crypto"
)

func TestSimGenesisAccountValidate(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions app/helpers/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"testing"
"time"

"github.com/Finschia/ostracon/libs/log"
octypes "github.com/Finschia/ostracon/types"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
dbm "github.com/tendermint/tm-db"

"github.com/Finschia/ostracon/libs/log"
octypes "github.com/Finschia/ostracon/types"

linkapp "github.com/Finschia/finschia/v2/app"
)

Expand Down
3 changes: 2 additions & 1 deletion cli_test/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ import (
"testing"
"time"

"github.com/stretchr/testify/require"

"github.com/Finschia/finschia-sdk/client/flags"
"github.com/Finschia/finschia-sdk/crypto/keys/ed25519"
sdk "github.com/Finschia/finschia-sdk/types"
"github.com/Finschia/finschia-sdk/types/tx"
gov "github.com/Finschia/finschia-sdk/x/gov/types"
minttypes "github.com/Finschia/finschia-sdk/x/mint/types"
osttypes "github.com/Finschia/ostracon/types"
"github.com/stretchr/testify/require"

"github.com/Finschia/finschia/v2/app"
)
Expand Down
3 changes: 1 addition & 2 deletions cli_test/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,13 @@ import (
stakingcli "github.com/Finschia/finschia-sdk/x/staking/client/cli"
staking "github.com/Finschia/finschia-sdk/x/staking/types"
"github.com/Finschia/finschia-sdk/x/stakingplus"
wasmcli "github.com/Finschia/wasmd/x/wasm/client/cli"

ostcmd "github.com/Finschia/ostracon/cmd/ostracon/commands"
ostcfg "github.com/Finschia/ostracon/config"
"github.com/Finschia/ostracon/libs/log"
osthttp "github.com/Finschia/ostracon/rpc/client/http"
ostctypes "github.com/Finschia/ostracon/rpc/core/types"
osttypes "github.com/Finschia/ostracon/types"
wasmcli "github.com/Finschia/wasmd/x/wasm/client/cli"
wasmtypes "github.com/Finschia/wasmd/x/wasm/types"

"github.com/Finschia/finschia/v2/app"
Expand Down
10 changes: 4 additions & 6 deletions cmd/fnsad/cmd/genaccounts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@ package cmd_test
import (
"context"
"fmt"

"testing"

"github.com/Finschia/finschia-sdk/crypto/hd"
"github.com/Finschia/finschia-sdk/crypto/keyring"
sdk "github.com/Finschia/finschia-sdk/types"

"github.com/Finschia/ostracon/libs/log"
"github.com/spf13/viper"
"github.com/stretchr/testify/require"

"github.com/Finschia/finschia-sdk/client"
"github.com/Finschia/finschia-sdk/client/flags"
"github.com/Finschia/finschia-sdk/crypto/hd"
"github.com/Finschia/finschia-sdk/crypto/keyring"
"github.com/Finschia/finschia-sdk/server"
"github.com/Finschia/finschia-sdk/simapp"
simcmd "github.com/Finschia/finschia-sdk/simapp/simd/cmd"
"github.com/Finschia/finschia-sdk/testutil/testdata"
sdk "github.com/Finschia/finschia-sdk/types"
"github.com/Finschia/finschia-sdk/types/module"
"github.com/Finschia/finschia-sdk/x/genutil"
genutiltest "github.com/Finschia/finschia-sdk/x/genutil/client/testutil"
"github.com/Finschia/ostracon/libs/log"
)

var testMbm = module.NewBasicManager(genutil.AppModuleBasic{})
Expand Down
11 changes: 6 additions & 5 deletions cmd/fnsad/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import (
"os"
"path/filepath"

"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cast"
"github.com/spf13/cobra"
"github.com/spf13/viper"
dbm "github.com/tendermint/tm-db"

"github.com/Finschia/finschia-sdk/baseapp"
"github.com/Finschia/finschia-sdk/client"
"github.com/Finschia/finschia-sdk/client/config"
Expand All @@ -31,11 +37,6 @@ import (
"github.com/Finschia/ostracon/libs/log"
"github.com/Finschia/wasmd/x/wasm"
wasmkeeper "github.com/Finschia/wasmd/x/wasm/keeper"
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cast"
"github.com/spf13/cobra"
"github.com/spf13/viper"
dbm "github.com/tendermint/tm-db"

"github.com/Finschia/finschia/v2/app"
"github.com/Finschia/finschia/v2/app/params"
Expand Down
5 changes: 3 additions & 2 deletions cmd/fnsad/cmd/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import (
"os"
"testing"

"github.com/stretchr/testify/require"
dbm "github.com/tendermint/tm-db"

"github.com/Finschia/finschia-sdk/client/flags"
"github.com/Finschia/finschia-sdk/server"
"github.com/Finschia/finschia-sdk/store/types"
"github.com/Finschia/ostracon/libs/log"
"github.com/stretchr/testify/require"
dbm "github.com/tendermint/tm-db"
)

func TestNewApp(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions cmd/fnsad/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ import (
"os"
"path/filepath"

"github.com/Finschia/finschia-sdk/testutil"
ostconfig "github.com/Finschia/ostracon/config"
ostos "github.com/Finschia/ostracon/libs/os"
ostrand "github.com/Finschia/ostracon/libs/rand"
"github.com/Finschia/ostracon/types"
osttime "github.com/Finschia/ostracon/types/time"
"github.com/spf13/cobra"

"github.com/Finschia/finschia-sdk/client"
Expand All @@ -26,13 +20,19 @@ import (
cryptotypes "github.com/Finschia/finschia-sdk/crypto/types"
"github.com/Finschia/finschia-sdk/server"
srvconfig "github.com/Finschia/finschia-sdk/server/config"
"github.com/Finschia/finschia-sdk/testutil"
sdk "github.com/Finschia/finschia-sdk/types"
"github.com/Finschia/finschia-sdk/types/module"
authtypes "github.com/Finschia/finschia-sdk/x/auth/types"
banktypes "github.com/Finschia/finschia-sdk/x/bank/types"
"github.com/Finschia/finschia-sdk/x/genutil"
genutiltypes "github.com/Finschia/finschia-sdk/x/genutil/types"
stakingtypes "github.com/Finschia/finschia-sdk/x/staking/types"
ostconfig "github.com/Finschia/ostracon/config"
ostos "github.com/Finschia/ostracon/libs/os"
ostrand "github.com/Finschia/ostracon/libs/rand"
"github.com/Finschia/ostracon/types"
osttime "github.com/Finschia/ostracon/types/time"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions cmd/fnsad/cmd/testnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ import (
"fmt"
"testing"

"github.com/spf13/viper"
"github.com/stretchr/testify/require"

"github.com/Finschia/finschia-sdk/client"
"github.com/Finschia/finschia-sdk/client/flags"
"github.com/Finschia/finschia-sdk/server"
banktypes "github.com/Finschia/finschia-sdk/x/bank/types"
genutiltest "github.com/Finschia/finschia-sdk/x/genutil/client/testutil"
genutiltypes "github.com/Finschia/finschia-sdk/x/genutil/types"
"github.com/Finschia/ostracon/libs/log"
"github.com/spf13/viper"
"github.com/stretchr/testify/require"

"github.com/Finschia/finschia/v2/app"
)
Expand Down

0 comments on commit c770a86

Please sign in to comment.