ci: add spell-check workflow with cspell and custom dictionary#312
ci: add spell-check workflow with cspell and custom dictionary#312giwaov wants to merge 2 commits into
Conversation
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
|
Warning Rate limit exceeded
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 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. WalkthroughThis 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 Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.protofiles. - Adds a
cspell.jsonconfiguration with a project-specific dictionary and ignore patterns. - Updates
CHANGELOG.mdto 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 |
There was a problem hiding this comment.
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.
| - main | |
| - main | |
| paths: | |
| - "**/*.md" | |
| - "**/*.go" | |
| - "**/*.proto" | |
| - ".github/workflows/spell-check.yml" | |
| - "cspell.json" |
| files: | | ||
| **/*.md | ||
| **/*.go | ||
| **/*.proto |
There was a problem hiding this comment.
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.
| files: | | |
| **/*.md | |
| **/*.go | |
| **/*.proto |
Add wasmd, lookback, misbehaviors, opencontainers, ulikunitz to the custom word list to fix spell-check CI failures on CHANGELOG.md.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/spell-check.yml (1)
4-13: Consider addingpush.pathsto reduce unnecessary workflow runs.
pull_requestis path-scoped, butpushcurrently runs for every commit tomain. 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
📒 Files selected for processing (3)
.github/workflows/spell-check.ymlCHANGELOG.mdcspell.json
|
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! |
|
Hey @Thaleszh, would love to get your eyes on this when you have a moment. Thanks! |
Summary
Add a CI workflow that runs cspell on
.md,.go, and.protofiles to catch typos in documentation and code comments, as requested in #67.Changes
.github/workflows/spell-check.yml.md,.go,.proto, or spell-check config filesmainstreetsidesoftware/cspell-action@v6withincremental_files_only: trueso only changed files are checked on PRs (keeps CI fast)cspell.jsoncometbft,kiichain,precompile,tokenfactory,wasmbinding)*.pb.go,*.pb.gw.go), test files,vendor/,go.sum,go.modwordsarrayTesting
The workflow will run on this PR itself, validating the configuration against the files changed.
Closes #67