Skip to content

Conversation

@chaptersix
Copy link
Contributor

@chaptersix chaptersix commented Oct 16, 2025

What changed?

  • Add the typos cli tool to the linters in the Makfile and CI
  • Added a config file to exclude generated files and other common false positive scenarios

Why?

Reduce the amount of misspellings while not being overly burdensome.

How did you test it?

  • use an AI agent to propose file exclusion rules.
  • run locally and tested manually

Potential risks

Too much time and effort being used on adding exclusion.

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)
@chaptersix
Copy link
Contributor Author

image

@chaptersix
Copy link
Contributor Author

> typos --config .github/_typos.toml --format json | wc -l                                                                                                                                                                                                                                                                                         
     573

@chaptersix chaptersix marked this pull request as ready for review November 23, 2025 01:58
@chaptersix chaptersix requested review from a team as code owners November 23, 2025 01:58
@chaptersix chaptersix mentioned this pull request Nov 23, 2025
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.

2 participants