Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
fix: lint workflow (#1028)
Browse files Browse the repository at this point in the history
* fix lint workflow

* fix comment

* remove format

* change checkout with setup-go

* update comment

* add checkout

* add lint issue

* revert lint error
  • Loading branch information
thomas-nguy authored Apr 5, 2022
1 parent cc37ed2 commit 8202a09
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,20 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6.0.1
id: git_diff
with:
SUFFIX_FILTER: |
.go
.mod
.sum
- uses: golangci/golangci-lint-action@v2.5.2
PATTERNS: |
**/**.go
go.mod
go.sum
- uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.42.1
version: latest
args: --timeout 10m
github-token: ${{ secrets.github_token }}
# Check only if there are differences in the source code
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ benchmark:
###############################################################################

lint:
golangci-lint run --out-format=tab
@@test -n "$$golangci-lint version | awk '$4 >= 1.42')"
golangci-lint run --out-format=tab -n

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
Expand Down
2 changes: 1 addition & 1 deletion x/evm/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (suite *EvmTestSuite) DoSetupTest(t require.TestingT) {
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{})
genesisState[banktypes.ModuleName] = suite.app.AppCodec().MustMarshalJSON(bankGenesis)

Expand Down
2 changes: 1 addition & 1 deletion x/evm/keeper/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (k *Keeper) EVMConfig(ctx sdk.Context) (*types.EVMConfig, error) {
}, 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 {
return statedb.NewTxConfig(
common.BytesToHash(ctx.HeaderHash()), // BlockHash
Expand Down

0 comments on commit 8202a09

Please sign in to comment.