Skip to content

Commit

Permalink
Merge pull request #65 from initia-labs/chore/spellcheck
Browse files Browse the repository at this point in the history
chore: add spellchecker
  • Loading branch information
Vritra4 authored Nov 15, 2024
2 parents bf9911a + a8914be commit 8360f0f
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 5 deletions.
11 changes: 11 additions & 0 deletions .github/config/.codespellignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cips
pullrequest
keypair
pastTime
hasTables
Nam
EyT
upTo
initia
minitia
expRes
28 changes: 28 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Spell Check

on:
pull_request:

jobs:
spellcheck:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run codespell
continue-on-error: true
run: |
sudo apt-get install codespell -y
codespell -w --skip="*.pulsar.go,*.pb.go,*.pb.gw.go,*.cosmos_orm.go,*.json,*.git,*.js,crypto/keys,fuzz,*.h,proto/tendermint,*.bin,go.sum,go.work.sum,go.mod,statik.go,*.map,swagger.yaml" --ignore-words=.github/config/.codespellignore
- uses: peter-evans/[email protected]
if: github.event_name != 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: fix typos"
title: "chore: fix typos"
branch: "chore/fix-typos"
delete-branch: true
body: |
This PR fixes typos in the codebase.
Please review it, and merge if everything is fine.
If there are proto changes, run `make proto-gen` and commit the changes.
2 changes: 1 addition & 1 deletion submodules/evm-nft/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (sm EvmNFTSubmodule) handlerTransferEvent(ctx context.Context, event *types

token, err := sm.tokenMap.Get(ctx, tpk)
if err != nil {
sm.Logger(ctx).Debug("failed to get nft from prev owner and object addres", "collection-addr", event.Address, "token-id", event.TokenId, "prevOwner", event.From, "error", err)
sm.Logger(ctx).Debug("failed to get nft from prev owner and object address", "collection-addr", event.Address, "token-id", event.TokenId, "prevOwner", event.From, "error", err)
return cosmoserr.Wrap(err, "failed to get nft from tokenMap")
}
token.OwnerAddr = event.To.String()
Expand Down
2 changes: 1 addition & 1 deletion submodules/move-nft/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (sm MoveNftSubmodule) handlerTransferEvent(ctx context.Context, event types
sm.Logger(ctx).Debug("nft not found, maybe not NFT related object transfer", "object", objectSdkAddr.String(), "prevOwner", fromSdkAddr.String())
return nil
}
sm.Logger(ctx).Info("failed to get nft from prev owner and object addres", "err", err, "object", objectSdkAddr.String(), "prev", fromSdkAddr.String())
sm.Logger(ctx).Info("failed to get nft from prev owner and object address", "err", err, "object", objectSdkAddr.String(), "prev", fromSdkAddr.String())

return err
}
Expand Down
2 changes: 1 addition & 1 deletion submodules/pair/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type TokenPairsResponse struct {

type MetadataResource struct {
Resource struct {
Adddress string `json:"address"`
Address string `json:"address"`
StructTag string `json:"struct_tag"`
MoveResource string `json:"move_resource"`
RawBytes []byte `json:"raw_bytes"`
Expand Down
2 changes: 1 addition & 1 deletion submodules/wasm-pair/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type TokenPairsResponse struct {

type MetadataResource struct {
Resource struct {
Adddress string `json:"address"`
Address string `json:"address"`
StructTag string `json:"struct_tag"`
MoveResource string `json:"move_resource"`
RawBytes []byte `json:"raw_bytes"`
Expand Down
2 changes: 1 addition & 1 deletion x/kvindexer/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (k Keeper) Close() error {
}

// NewKeeper creates a new indexer Keeper instance
// TODO: remove unncessary arguments
// TODO: remove unnecessary arguments
func NewKeeper(
cdc codec.Codec,
vmType string,
Expand Down

0 comments on commit 8360f0f

Please sign in to comment.