Add codespell support with configuration and fixes#1028
Open
yarikoptic wants to merge 5 commits intoPagefind:mainfrom
Open
Add codespell support with configuration and fixes#1028yarikoptic wants to merge 5 commits intoPagefind:mainfrom
yarikoptic wants to merge 5 commits intoPagefind:mainfrom
Conversation
Skip directories: - snowball (Snowball stemmer algorithms - linguistic suffix patterns) - translations (i18n files with foreign language words) - integration_tests (test data with intentional partial words) - gz.js (vendored fflate library) - .npm, .cache (local caches) Whitelist: caf (stemmed "café"), unparseable (valid variant), varius (Latin lorem ipsum)
- bunding -> bundling (CHANGELOG.md) - context: "bundling the UI JavaScript files" - orginal -> original (wrappers/python) - local variable name typo
Fixed typos: - Stablized -> Stabilized (CHANGELOG.md) - Ukranian -> Ukrainian (CHANGELOG.md) - langauge -> language (docs/content/docs/api.md, docs/content/docs/ui-usage.md) - paramaters -> parameters (docs/content/docs/ranking.md, pagefind_web/src/lib.rs, pagefind_web_js/types/index.d.ts) - Wrapps -> Wraps (pagefind_stem/src/lib.rs) Command: uvx codespell -w
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add codespell configuration and fix existing typos.
More about codespell: https://github.com/codespell-project/codespell
I personally introduced it to dozens if not hundreds of projects already and so far only positive feedback.
CI workflow has 'permissions' set only to 'read' so also should be safe.
Changes
Configuration & Infrastructure
.codespellrcconfiguration with comprehensive skip patternsSkip Patterns
Configured to skip directories/files that produce false positives:
snowball— Snowball stemmer algorithm code (linguistic suffix patterns likeket,amongs)translations— i18n files with foreign language wordsintegration_tests— test data with intentional partial words (worl,Nam,Resul)gz.js— vendored fflate compression library.npm,.cache— local caches*.svg,*.css,*.lock, etc. — binary/generated filesDomain-Specific Whitelist
Added legitimate terms that codespell flags as typos:
caf— stemmed form of "café" (used in search indexing)unparseable— widely used variant of "unparsable"varius— Latin lorem ipsum text in test dataTypo Fixes
Ambiguous typos fixed manually (2 fixes with context review):
bunding→bundling(CHANGELOG.md — context: "bundling the UI JavaScript files")orginal→original(Python wrapper — local variable name typo)Non-ambiguous typos fixed automatically (8 fixes in 7 files):
Stablized→Stabilized(CHANGELOG.md)Ukranian→Ukrainian(CHANGELOG.md)langauge→language(api.md, ui-usage.md)paramaters→parameters(ranking.md, lib.rs, index.d.ts)Wrapps→Wraps(pagefind_stem/src/lib.rs)Historical Context
This project has had 19 prior commits fixing typos manually, demonstrating the value of automated spell-checking.
Testing
Codespell passes with zero errors after all fixes.
🤖 Generated with Claude Code and love to typos free code