Skip to content

Commit 4434dfb

Browse files
authored
add spellchecker and run (#43)
1 parent 13e1849 commit 4434dfb

File tree

4 files changed

+42
-3
lines changed

4 files changed

+42
-3
lines changed

.github/config/.codespellignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cips
2+
pullrequest
3+
keypair
4+
pastTime
5+
hasTables
6+
Nam
7+
EyT
8+
upTo
9+
initia
10+
minitia
11+
expRes

.github/workflows/spellcheck.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Spell Check
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
spellcheck:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Run codespell
13+
continue-on-error: true
14+
run: |
15+
sudo apt-get install codespell -y
16+
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
17+
- uses: peter-evans/[email protected]
18+
if: github.event_name != 'pull_request'
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
commit-message: "chore: fix typos"
22+
title: "chore: fix typos"
23+
branch: "chore/fix-typos"
24+
delete-branch: true
25+
body: |
26+
This PR fixes typos in the codebase.
27+
Please review it, and merge if everything is fine.
28+
If there are proto changes, run `make proto-gen` and commit the changes.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Used for running OPinit bots in a Docker container
22
#
3-
# Useage:
3+
# Usage:
44
# $ docker build --tag opinit-bots .
55

66
FROM golang:1.23-alpine AS builder

node/broadcaster/process.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (b *Broadcaster) HandleNewBlock(block *rpccoretypes.ResultBlock, blockResul
3838
}
3939

4040
// check timeout of pending txs
41-
// @sh-cha: should we rebroadcast pending txs? or rasing monitoring alert?
41+
// @sh-cha: should we rebroadcast pending txs? or raising monitoring alert?
4242
if length := b.LenLocalPendingTx(); length > 0 {
4343
b.logger.Debug("remaining pending txs", zap.Int64("height", block.Block.Height), zap.Int("count", length))
4444
pendingTxTime := time.Unix(0, b.peekLocalPendingTx().Timestamp)
@@ -67,7 +67,7 @@ func (b *Broadcaster) CheckPendingTx(ctx context.Context) (*btypes.PendingTxInfo
6767
return nil, nil, time.Time{}, err
6868
}
6969
if lastBlockResult.Block.Time.After(pendingTxTime.Add(b.cfg.TxTimeout)) {
70-
// @sh-cha: should we rebroadcast pending txs? or rasing monitoring alert?
70+
// @sh-cha: should we rebroadcast pending txs? or raising monitoring alert?
7171
panic(fmt.Errorf("something wrong, pending txs are not processed for a long time; current block time: %s, pending tx processing time: %s", time.Now().UTC().String(), pendingTxTime.UTC().String()))
7272
}
7373

0 commit comments

Comments
 (0)