Skip to content

ci: add spell-check workflow with cspell and custom dictionary#312

Open
giwaov wants to merge 2 commits into
KiiChain:mainfrom
giwaov:ci/spell-check
Open

ci: add spell-check workflow with cspell and custom dictionary#312
giwaov wants to merge 2 commits into
KiiChain:mainfrom
giwaov:ci/spell-check

Conversation

@giwaov
Copy link
Copy Markdown

@giwaov giwaov commented Apr 2, 2026

Summary

Add a CI workflow that runs cspell on .md, .go, and .proto files to catch typos in documentation and code comments, as requested in #67.

Changes

.github/workflows/spell-check.yml

  • Runs on PRs that touch .md, .go, .proto, or spell-check config files
  • Runs on pushes to main
  • Uses streetsidesoftware/cspell-action@v6 with incremental_files_only: true so only changed files are checked on PRs (keeps CI fast)
  • Strict mode: fails the check on any new typo

cspell.json

  • Custom dictionary with ~80 blockchain, Cosmos SDK, and KiiChain-specific terms (e.g., cometbft, kiichain, precompile, tokenfactory, wasmbinding)
  • Ignores generated files (*.pb.go, *.pb.gw.go), test files, vendor/, go.sum, go.mod
  • Minimum word length of 4 to skip short abbreviations
  • Easy to extend: contributors just add terms to the words array

Testing

The workflow will run on this PR itself, validating the configuration against the files changed.

Closes #67

Add a GitHub Actions workflow that runs cspell on .md, .go, and .proto
files to catch typos in documentation and code comments. Includes a
custom cspell.json dictionary with blockchain, Cosmos SDK, and
KiiChain-specific terms to avoid false positives.

Closes KiiChain#67
@giwaov giwaov requested a review from jhelison as a code owner April 2, 2026 11:44
Copilot AI review requested due to automatic review settings April 2, 2026 11:44
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 2, 2026

Warning

Rate limit exceeded

@giwaov has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 45 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 45 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a1c6a571-afd2-41ff-b097-113e7d7381ea

📥 Commits

Reviewing files that changed from the base of the PR and between 7a53553 and 0a70fc5.

📒 Files selected for processing (1)
  • cspell.json

Walkthrough

This pull request introduces spell-checking infrastructure to the project. It adds a GitHub Actions workflow that runs on pushes to the main branch and pull requests modifying Markdown, Go, or Proto files. The workflow executes the cspell spell-checker tool using a new configuration file that specifies target file types, ignored paths (such as node_modules, vendor, and generated files), and a custom dictionary containing Cosmos SDK and related blockchain terminology. A changelog entry documents this addition.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding a spell-check CI workflow with cspell and a custom dictionary.
Description check ✅ Passed The description comprehensively explains the changes, their purpose, implementation details, and references the related issue #67.
Linked Issues check ✅ Passed The PR fully implements the requirements from issue #67: integrates cspell, fails CI on typos, applies checks to .md/.go/.proto files, and uses a custom whitelist for blockchain/Cosmos terms.
Out of Scope Changes check ✅ Passed All changes (workflow file, cspell.json, and changelog entry) are directly related to implementing the spell-check CI workflow requested in issue #67.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a spell-check CI workflow using cspell to catch typos in documentation and code comments, addressing the request in issue #67.

Changes:

  • Introduces a GitHub Actions workflow to run cspell on .md, .go, and .proto files.
  • Adds a cspell.json configuration with a project-specific dictionary and ignore patterns.
  • Updates CHANGELOG.md to record the new CI check.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/spell-check.yml New workflow to run cspell in CI on PRs and pushes to main.
cspell.json Adds cspell configuration, ignore paths, and custom dictionary terms.
CHANGELOG.md Documents the addition of spell-check CI under “Unreleased”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

on:
push:
branches:
- main
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The push trigger runs on every push to main (no paths filter), which can add unnecessary CI load for commits that don’t touch spell-checkable files. Consider adding the same paths list under on.push (or a paths-ignore equivalent) to keep the workflow aligned with the stated goal of keeping CI fast.

Suggested change
- main
- main
paths:
- "**/*.md"
- "**/*.go"
- "**/*.proto"
- ".github/workflows/spell-check.yml"
- "cspell.json"

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +32
files: |
**/*.md
**/*.go
**/*.proto
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File globs are defined in two places (cspell.json "files" and the workflow with.files). This duplication can drift over time (e.g., adding a new extension requires updating both). Prefer keeping the source of truth in one place—either rely on the config’s files list, or remove it from the config and manage patterns only in the workflow.

Suggested change
files: |
**/*.md
**/*.go
**/*.proto

Copilot uses AI. Check for mistakes.
Add wasmd, lookback, misbehaviors, opencontainers, ulikunitz to
the custom word list to fix spell-check CI failures on CHANGELOG.md.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/spell-check.yml (1)

4-13: Consider adding push.paths to reduce unnecessary workflow runs.

pull_request is path-scoped, but push currently runs for every commit to main. Mirroring the same path filter on push would cut no-op runs and keep trigger behavior consistent.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/spell-check.yml around lines 4 - 13, The workflow
currently triggers on all pushes to main because the push trigger lacks a paths
filter; update the push trigger in .github/workflows/spell-check.yml to include
the same paths array used by pull_request (the paths entries under pull_request)
so push.paths mirrors pull_request.paths and avoids unnecessary runs, ensuring
you modify the push section (the push: block and its paths key) to list the same
glob patterns.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cspell.json`:
- Around line 17-95: The cspell allowlist in cspell.json ("words" array) is
missing project-specific terms referenced in CHANGELOG.md causing CI spell-check
failures; update the "words" array in cspell.json to include the missing terms
such as misbehaviors, wasmd, ulikunitz, opencontainers, and lookback (and any
other tokens listed in CHANGELOG.md) so the spell checker recognizes them.

---

Nitpick comments:
In @.github/workflows/spell-check.yml:
- Around line 4-13: The workflow currently triggers on all pushes to main
because the push trigger lacks a paths filter; update the push trigger in
.github/workflows/spell-check.yml to include the same paths array used by
pull_request (the paths entries under pull_request) so push.paths mirrors
pull_request.paths and avoids unnecessary runs, ensuring you modify the push
section (the push: block and its paths key) to list the same glob patterns.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 60e8becf-a0f5-405a-bcb5-6b29d289ee5c

📥 Commits

Reviewing files that changed from the base of the PR and between 5c894a6 and 7a53553.

📒 Files selected for processing (3)
  • .github/workflows/spell-check.yml
  • CHANGELOG.md
  • cspell.json

Comment thread cspell.json
@giwaov
Copy link
Copy Markdown
Author

giwaov commented Apr 10, 2026

Hi @jhelison — friendly ping! This PR is ready for review whenever you have a moment. All CI checks are passing. Happy to address any feedback. Thanks!

@giwaov
Copy link
Copy Markdown
Author

giwaov commented Apr 21, 2026

Hey @Thaleszh, would love to get your eyes on this when you have a moment. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI/CD: Spell-check documentation and code comments

2 participants