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

ci: typos and link checks #73

Merged
merged 2 commits into from
Mar 26, 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
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = *.pulsar.go,*.pb.go,*.pb.gw.go,*.json,*.git,*.bin,*.sum,*.mod
ignore-words-list = usera
count =
quiet-level = 3
23 changes: 23 additions & 0 deletions .github/workflows/chores.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: chores

on:
pull_request:

jobs:
link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gaurav-nelson/[email protected]

typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run codespell
continue-on-error: true
run: |
# .codespellrc is used
sudo apt-get install codespell -y
codespell -w --config .codespellrc
exit $?
2 changes: 1 addition & 1 deletion cmd/appstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (a *AppState) InitLogger() {
level = zerolog.ErrorLevel
}

// a.Debug ovverrides a.loglevel
// a.Debug overrides a.loglevel
if a.Debug {
a.Logger = log.NewLogger(os.Stdout, log.LevelOption(zerolog.DebugLevel))
} else {
Expand Down
2 changes: 1 addition & 1 deletion cmd/process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func TestProcessInvalidDestinationCaller(t *testing.T) {
require.Equal(t, types.Filtered, actualState.Msgs[0].Status)
}

// we want to filter out the transaction if the route is not enalbed
// we want to filter out the transaction if the route is not enabled
func TestFilterDisabledCCTPRoutes(t *testing.T) {

logger := log.NewLogger(os.Stdout, log.LevelOption(zerolog.DebugLevel))
Expand Down
2 changes: 1 addition & 1 deletion ethereum/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var content embed.FS
var _ types.Chain = (*Ethereum)(nil)

type Ethereum struct {
// from conifg
// from config
name string
chainID int64
domain types.Domain
Expand Down
2 changes: 1 addition & 1 deletion noble/message_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func txToMessageState(tx *ctypes.ResultTx) ([]*types.MessageState, error) {
for _, attr := range event.Attributes {
decodedKey, err := base64.StdEncoding.DecodeString(attr.Key)
if err != nil {
parseErrs = errors.Join(parseErrs, fmt.Errorf("failed to decode attribue key: %w", err))
parseErrs = errors.Join(parseErrs, fmt.Errorf("failed to decode attribute key: %w", err))
}
if string(decodedKey) == "message" {
// fmt.Printf("Saw message attribute %s - %d\n", tx.Hash, i)
Expand Down
2 changes: 1 addition & 1 deletion types/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestStateHandling(t *testing.T) {

loadedMsg.Msgs[0].Status = Complete

// Becasue it is a pointer, no need to re-store to state
// Because it is a pointer, no need to re-store to state
// message status should be updated with out re-storing.
loadedMsg2, _ := stateMap.Load(txHash)
require.Equal(t, Complete, loadedMsg2.Msgs[0].Status)
Expand Down
Loading