-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Spell Checker #8495
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
base: main
Are you sure you want to change the base?
Spell Checker #8495
Conversation
Add crate-ci/typos spell checker to the project for automatic spell checking: - Add _typos.toml configuration in .github/ (next to golangci config) - Exclude generated protobuf files (*.pb.go, *.proto, etc.) - Add typos job to GitHub Actions linters workflow - Add lint-typos and lint-typos-changed targets to Makefile - lint-typos-changed checks only files changed from main (fast for local dev) - Integrate lint-typos-changed into main lint target for faster local runs - Document inline ignore directives and --file-list usage in config The spell checker will run in CI on all files, while local make lint will only check changed files for better performance.
Added exceptions for intentional "misspellings" and false positives: - Preemptable (used instead of Preemptible for caller types) - ba, Ue, nd, abd (test data and hash strings) - AVAILABILTY (backwards-compatible environment variable) - Heartbeart/heartbeart (proto-generated field names - need proto fix first) - SVG file exclusion (hex color codes trigger false positives) - testdata directory exclusion - json.gz file exclusion These exceptions prevent the typo linter from flagging legitimate code patterns and test data while still catching real spelling errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
| @@ -0,0 +1,63 @@ | |||
| # Configuration for typos spell checker | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generated by getting an agent to attempt spell corrections and propose exclusions.
|
| @if command -v $(TYPOS) >/dev/null 2>&1; then \ | ||
| $(TYPOS) --config .github/_typos.toml; \ | ||
| else \ | ||
| printf $(RED) "WARNING: typos is not installed. Install it from https://github.com/crate-ci/typos or run: cargo install typos-cli"; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opted to warn instead of installing. Open to changing this if there's a good pattern to follow for installation
| AVAILABILTY = "AVAILABILTY" | ||
| # Proto-generated field names that have typos in the proto definition | ||
| # These should be fixed in the proto file first, then regenerated | ||
| Heartbeart = "Heartbeart" | ||
| heartbeart = "heartbeart" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll double check these

What changed?
typoscli tool to the linters in the Makfile and CIWhy?
Reduce the amount of misspellings while not being overly burdensome.
How did you test it?
Potential risks
Too much time and effort being used on adding exclusion.