fix: lint workflow (#1028)
* fix lint workflow * fix comment * remove format * change checkout with setup-go * update comment * add checkout * add lint issue * revert lint error
This commit is contained in:
parent
cc37ed283a
commit
8202a097f2
17
.github/workflows/lint.yml
vendored
17
.github/workflows/lint.yml
vendored
@ -13,17 +13,20 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: 1.17
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: technote-space/get-diff-action@v6.0.1
|
- uses: technote-space/get-diff-action@v6.0.1
|
||||||
|
id: git_diff
|
||||||
with:
|
with:
|
||||||
SUFFIX_FILTER: |
|
PATTERNS: |
|
||||||
.go
|
**/**.go
|
||||||
.mod
|
go.mod
|
||||||
.sum
|
go.sum
|
||||||
- uses: golangci/golangci-lint-action@v2.5.2
|
- uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
version: latest
|
||||||
version: v1.42.1
|
|
||||||
args: --timeout 10m
|
args: --timeout 10m
|
||||||
github-token: ${{ secrets.github_token }}
|
github-token: ${{ secrets.github_token }}
|
||||||
# Check only if there are differences in the source code
|
# Check only if there are differences in the source code
|
||||||
|
3
Makefile
3
Makefile
@ -394,7 +394,8 @@ benchmark:
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
golangci-lint run --out-format=tab
|
@@test -n "$$golangci-lint version | awk '$4 >= 1.42')"
|
||||||
|
golangci-lint run --out-format=tab -n
|
||||||
|
|
||||||
format:
|
format:
|
||||||
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -name '*.pb.go' -not -name '*.pb.gw.go' | xargs gofumpt -d -e -extra
|
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -name '*.pb.go' -not -name '*.pb.gw.go' | xargs gofumpt -d -e -extra
|
||||||
|
@ -99,7 +99,7 @@ func (suite *EvmTestSuite) DoSetupTest(t require.TestingT) {
|
|||||||
Coins: coins,
|
Coins: coins,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
// update total supply
|
// Update total supply
|
||||||
bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, sdk.NewCoins(sdk.NewCoin(types.DefaultEVMDenom, sdk.NewInt(200000000000000))), []banktypes.Metadata{})
|
bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, sdk.NewCoins(sdk.NewCoin(types.DefaultEVMDenom, sdk.NewInt(200000000000000))), []banktypes.Metadata{})
|
||||||
genesisState[banktypes.ModuleName] = suite.app.AppCodec().MustMarshalJSON(bankGenesis)
|
genesisState[banktypes.ModuleName] = suite.app.AppCodec().MustMarshalJSON(bankGenesis)
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ func (k *Keeper) EVMConfig(ctx sdk.Context) (*types.EVMConfig, error) {
|
|||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TxConfig load `TxConfig` from current transient storage
|
// TxConfig loads `TxConfig` from current transient storage
|
||||||
func (k *Keeper) TxConfig(ctx sdk.Context, txHash common.Hash) statedb.TxConfig {
|
func (k *Keeper) TxConfig(ctx sdk.Context, txHash common.Hash) statedb.TxConfig {
|
||||||
return statedb.NewTxConfig(
|
return statedb.NewTxConfig(
|
||||||
common.BytesToHash(ctx.HeaderHash()), // BlockHash
|
common.BytesToHash(ctx.HeaderHash()), // BlockHash
|
||||||
|
Loading…
Reference in New Issue
Block a user