feat: add Spell checker using GitHub Actions#470
Conversation
|
Note
|
| Cohort / File(s) | Summary |
|---|---|
Spell-check Configuration .config/spell-check.toml, .github/workflows/spelling.yml |
New spell-check configuration file defining file exclusion patterns and a GitHub Actions workflow that runs the typos spell-checker on pushes and pull requests. |
Documentation Fix content/api-reference/index.mdx |
Corrected typo: changed "REST-ful APIs" to "REST-full APIs". |
Estimated code review effort
🎯 1 (Trivial) | ⏱️ ~3 minutes
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately summarizes the main change: adding a spell checker using GitHub Actions. The PR introduces a spell-check workflow configuration and related files. |
| 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
- Post copyable unit tests in a comment
- Commit unit tests in branch
feat/gh-action-spellchecker
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 @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.config/spell-check.toml (1)
1-10: Consider adding an[default.extend-words]section for domain-specific terms.Without an allow-list, the spell checker will flag valid technical terms (e.g., "RESTful"), leading to incorrect "fixes" like the one in this PR. Also consider excluding lock files.
+[default.extend-words] +# Domain-specific terms +RESTful = "RESTful" + [files] extend-exclude = [ ".next", ".idea", ".source", "node_modules", "cloudflare-env.d.ts", # Biome config is schema defined - "biome.json" + "biome.json", + "pnpm-lock.yaml", + "package-lock.json" ]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.config/spell-check.toml around lines 1 - 10, Add a spell-check allow-list and exclude lockfiles: update the .config/spell-check.toml by adding a [default.extend-words] section listing domain-specific terms (e.g., RESTful, lancedb, Cloudflare, Biome, etc.) so the spell checker does not suggest incorrect fixes, and extend the existing [files].extend-exclude array to include common lock files (e.g., package-lock.json, yarn.lock, pnpm-lock.yaml) and any other repo-specific artifacts; reference the existing [files] and extend-exclude keys to locate where to add these entries.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/spelling.yml:
- Around line 6-11: The push trigger in the GitHub Actions workflow's "on: push"
block only lists "main", so the workflow never runs on the repository's default
branch; update the branches array under the "push" trigger to include "v0-2"
(i.e., add "v0-2" alongside "main" in the branches list) so spell checks run
when changes are pushed to the default branch.
In `@content/api-reference/index.mdx`:
- Line 15: The phrase "REST-full" in the content should be reverted to the
industry-standard "RESTful" and instead of modifying content to avoid future
spell-check flags, add "RESTful" (and variants if desired) to the spell-check
whitelist; update the spell-check config (the extend-words section in
.config/spell-check.toml) to include RESTful (and optionally REST-ful) and
revert the change in content/api-reference/index.mdx from "REST-full" back to
"RESTful" so the text is correct while the spell-check recognizes the term.
---
Nitpick comments:
In @.config/spell-check.toml:
- Around line 1-10: Add a spell-check allow-list and exclude lockfiles: update
the .config/spell-check.toml by adding a [default.extend-words] section listing
domain-specific terms (e.g., RESTful, lancedb, Cloudflare, Biome, etc.) so the
spell checker does not suggest incorrect fixes, and extend the existing
[files].extend-exclude array to include common lock files (e.g.,
package-lock.json, yarn.lock, pnpm-lock.yaml) and any other repo-specific
artifacts; reference the existing [files] and extend-exclude keys to locate
where to add these entries.
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check the default branch of the repository
git remote show origin 2>/dev/null | grep "HEAD branch" || echo "Could not determine default branch"
# Also check what branches exist
git branch -r | head -20Repository: logchimp/docs
Length of output: 119
Add v0-2 to the push trigger — the workflow doesn't run on the default branch.
The workflow only triggers on pushes to main, but v0-2 is the repository's default branch. Spell checks won't run when changes are pushed to the primary development branch. Update the workflow to include v0-2:
Suggested fix
on:
push:
branches:
- main
+ - v0-2
pull_request:📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - v0-2 | |
| pull_request: | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/spelling.yml around lines 6 - 11, The push trigger in the
GitHub Actions workflow's "on: push" block only lists "main", so the workflow
never runs on the repository's default branch; update the branches array under
the "push" trigger to include "v0-2" (i.e., add "v0-2" alongside "main" in the
branches list) so spell checks run when changes are pushed to the default
branch.
| If you’re new to LogChimp, start with the [Guide](/guide), then come back here for details on specific endpoints. | ||
|
|
||
| LogChimp uses REST-ful APIs to build the backend on which it delivers content to the client side. | ||
| LogChimp uses REST-full APIs to build the backend on which it delivers content to the client side. |
There was a problem hiding this comment.
"REST-full" is incorrect — the standard term is "RESTful".
This change introduces a typo rather than fixing one. "RESTful" (from REST: Representational State Transfer) is the established industry term. "REST-full" is not a word.
Instead of changing the content, add RESTful (and variants like REST-ful) to an allowed-words list in the spell-check config so typos won't flag it. For example, in .config/spell-check.toml:
[default.extend-words]
# Industry-standard term
RESTful = "RESTful"And revert this line:
-LogChimp uses REST-full APIs to build the backend on which it delivers content to the client side.
+LogChimp uses RESTful APIs to build the backend on which it delivers content to the client side.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@content/api-reference/index.mdx` at line 15, The phrase "REST-full" in the
content should be reverted to the industry-standard "RESTful" and instead of
modifying content to avoid future spell-check flags, add "RESTful" (and variants
if desired) to the spell-check whitelist; update the spell-check config (the
extend-words section in .config/spell-check.toml) to include RESTful (and
optionally REST-ful) and revert the change in content/api-reference/index.mdx
from "REST-full" back to "RESTful" so the text is correct while the spell-check
recognizes the term.
Summary by CodeRabbit
Chores
Bug Fixes