diff --git a/.github/.misspell-fixer.ignore b/.github/.misspell-fixer.ignore new file mode 100644 index 0000000000..4536c720c9 --- /dev/null +++ b/.github/.misspell-fixer.ignore @@ -0,0 +1,4 @@ +\*.pulsar.go +\*.pb.go +\*.pb.gw.go +\*.cosmos_orm.go \ No newline at end of file diff --git a/.github/workflows/misspell.yml b/.github/workflows/misspell.yml new file mode 100644 index 0000000000..e6d001cbb4 --- /dev/null +++ b/.github/workflows/misspell.yml @@ -0,0 +1,24 @@ +name: Fix typos nightly + +on: + schedule: + - cron: "0 8 * * *" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: sobolevn/misspell-fixer-action@e5368f1b21585248afad4d32df9bc100451dbbff + - uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.PRBOT_PAT }} + commit-message: "chore: fixes by misspell-fixer" + title: "chore: typos fix by misspell-fixer" + branch: "bot/fix-typos" + delete-branch: true + body: | + This PR fixes typos in the codebase. + Please, review it and merge if everything is fine. + If there is proto changes, please, run `make proto-gen` and commit changes. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d3a56e541a..c336903968 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,11 +47,15 @@ contributors, the general procedure for contributing has been established: to begin work. 5. To submit your work as a contribution to the repository follow standard GitHub best practices. See [pull request guideline](#pull-requests) below. -**Note:** For very small or blatantly obvious problems such as typos, you are +**Note:** For very small or blatantly obvious problems, you are not required to an open issue to submit a PR, but be aware that for more complex problems/features, if a PR is opened before an adequate design discussion has taken place in a GitHub issue, that PR runs a high likelihood of being rejected. +**Note 2:** At this time, we will not be accepting contributions that only fix spelling +or grammar errors in documentation, code or elsewhere. The repository has a nightly job that +spell checks all files and will automatically open PRs for any spelling errors. + ## Teams Dev Calls The Cosmos SDK has many stakeholders contributing and shaping the project. The Core SDK team is composed of Interchain GmbH and Regen Network Development developers. Any long-term contributors and additional maintainers from other projects are welcome. We use self-organizing principles to coordinate and collaborate across organizations in structured "EPIC" that focus on specific problem domains or architectural components of the Cosmos SDK. diff --git a/x/staking/keeper/delegation.go b/x/staking/keeper/delegation.go index f6e6de9f48..caa79cc963 100644 --- a/x/staking/keeper/delegation.go +++ b/x/staking/keeper/delegation.go @@ -459,16 +459,16 @@ func (k Keeper) GetRedelegationsFromSrcValidator(ctx context.Context, valAddr sd // HasReceivingRedelegation checks if validator is receiving a redelegation. func (k Keeper) HasReceivingRedelegation(ctx context.Context, delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) (bool, error) { rng := collections.NewSuperPrefixedTripleRange[[]byte, []byte, []byte](valDstAddr, delAddr) - hasAtleastOneEntry := false + hasReceivingRedelegation := false err := k.RedelegationsByValDst.Walk(ctx, rng, func(key collections.Triple[[]byte, []byte, []byte], value []byte) (stop bool, err error) { - hasAtleastOneEntry = true + hasReceivingRedelegation = true return true, nil // returning true here to stop the iterations after 1st finding }) if err != nil { return false, err } - return hasAtleastOneEntry, nil + return hasReceivingRedelegation, nil } // HasMaxRedelegationEntries checks if the redelegation entries reached maximum limit.