Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add spellchecker and run #125

Merged
merged 2 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 api/opinit/ophost/v1/types.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions contrib/launchtools/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ func (l1config *L1Config) Finalize(buf *bufio.Reader) error {

if l1config.RPC_URL == "" {
defaultRPC := fmt.Sprintf("https://rpc.%s.initia.xyz:443", l1config.ChainID)
promt := fmt.Sprintf("Use default L1 rpc [%s]?", defaultRPC)
useDefault, err := input.GetConfirmation(promt, buf, os.Stderr)
prompt := fmt.Sprintf("Use default L1 rpc [%s]?", defaultRPC)
useDefault, err := input.GetConfirmation(prompt, buf, os.Stderr)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion contrib/launchtools/steps/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func initializeConfig(r *Relayer) error {
}

// initializeChains creates chain configuration files and initializes chains for the relayer
// "chains" in cosmos/relayer lingo means srcChain and dstChain. Speficic ports are not created here.
// "chains" in cosmos/relayer lingo means srcChain and dstChain. Specific ports are not created here.
// see initializePaths.
func initializeChains(config *launchtools.Config, basePath string) func(*Relayer) error {
// ChainConfig is a struct that represents the configuration of a chain
Expand Down
2 changes: 1 addition & 1 deletion proto/opinit/ophost/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ message BridgeConfig {
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
// The minium time duration that must elapse before a withdrawal can be finalized.
// The minimum time duration that must elapse before a withdrawal can be finalized.
google.protobuf.Duration finalization_period = 5 [
(gogoproto.stdduration) = true,
(gogoproto.jsontag) = "finalization_period,omitempty",
Expand Down
2 changes: 1 addition & 1 deletion specs/l2_output_oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The first version of the implementation does not include a dispute system, but u

L2 output oracle receives `output_root` with L2 block number to check the checkpoint of L2. The checkpoints are the multiple of `submission_interval`. A proposer must submit the `output_root` at the every checkpoints.

The followings are the components of `output_root`.
The following are the components of `output_root`.

- `version`: the version of output root
- `state_root`: l2 state root
Expand Down
4 changes: 2 additions & 2 deletions x/opchild/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func (ms MsgServer) FinalizeTokenDeposit(ctx context.Context, req *types.MsgFina
depositSuccess, reason = ms.safeDepositToken(ctx, toAddr, sdk.NewCoins(coin))
}

// updae l1 sequence
// update l1 sequence
if _, err := ms.IncreaseNextL1Sequence(ctx); err != nil {
return nil, err
}
Expand Down Expand Up @@ -459,7 +459,7 @@ func (ms MsgServer) FinalizeTokenDeposit(ctx context.Context, req *types.MsgFina
// emit deposit event
sdkCtx.EventManager().EmitEvent(event)

// if the deposit is failed, initate a withdrawal
// if the deposit is failed, initiate a withdrawal
if !depositSuccess || !hookSuccess {
if depositSuccess {
// reclaim and burn coins
Expand Down
2 changes: 1 addition & 1 deletion x/opchild/types/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var (
ErrZeroMaxValidators = errorsmod.Register(ModuleName, 12, "max validators must be non-zero")
ErrInvalidExecuteMsg = errorsmod.Register(ModuleName, 13, "invalid execute message")
ErrUnroutableExecuteMsg = errorsmod.Register(ModuleName, 14, "unroutable execute message")
ErrInvalidExecutorChangePlan = errorsmod.Register(ModuleName, 15, "invalid executor chane plan")
ErrInvalidExecutorChangePlan = errorsmod.Register(ModuleName, 15, "invalid executor change plan")
ErrAlreadyRegisteredHeight = errorsmod.Register(ModuleName, 16, "executor change plan already exists at the height")
ErrInvalidBridgeInfo = errorsmod.Register(ModuleName, 17, "invalid bridge info")
ErrInvalidHeight = errorsmod.Register(ModuleName, 18, "invalid oracle height")
Expand Down
2 changes: 1 addition & 1 deletion x/ophost/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (ms MsgServer) DeleteOutput(ctx context.Context, req *types.MsgDeleteOutput
return nil, err
}

// gov, current propoer or current challenger can delete output.
// gov, current proper or current challenger can delete output.
if ms.authority != challenger && bridgeConfig.Proposer != challenger && bridgeConfig.Challenger != challenger {
return nil, errors.ErrUnauthorized.Wrapf("invalid challenger; expected %s, %s or %s, got %s", ms.authority, bridgeConfig.Proposer, bridgeConfig.Challenger, challenger)
}
Expand Down
2 changes: 1 addition & 1 deletion x/ophost/types/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading