chore: add codespell support (config, workflow to detect/not fix) and make it fix some typos#546
chore: add codespell support (config, workflow to detect/not fix) and make it fix some typos#546yarikoptic wants to merge 6 commits intogoogle:mainfrom
Conversation
Fixed ambiguous typos: - custome -> custom (samples/client/angular/README.md:9) - 'Google Map custom components' - Reenable -> Re-enable (tools/editor/middleware/gemini.ts:23) - TODO comment
Fixed typos: - comonents -> components (docs/renderers.md:9) - releative -> relative (samples/client/angular/projects/a2a-chat-canvas/src/lib/components/chat/input-area/input-area.scss:21) - reponse -> response (samples/client/angular/projects/a2a-chat-canvas/src/lib/services/chat-service.ts:261) - effecient -> efficient (specification/v0_9/docs/a2ui_protocol.md:102)
There was a problem hiding this comment.
Code Review
This pull request introduces codespell to the project, a valuable tool for ensuring correctness in code and documentation by catching typos. The changes include the necessary configuration for codespell and corrections for several typos it identified. The fixes are accurate and improve the quality of the codebase. I have one suggestion to enhance the .codespellrc configuration to make it more robust for future changes.
| @@ -0,0 +1,6 @@ | |||
| [codespell] | |||
| # Ref: https://github.com/codespell-project/codespell#using-a-config-file | |||
| skip = .git*,*.svg,package-lock.json,*-lock.yaml,*.lock,*.css,.codespellrc,.cache,.npm | |||
There was a problem hiding this comment.
The skip list is a good start, but it could be more comprehensive. It's a good practice to explicitly skip common binary file formats to prevent codespell from trying to scan them. This can improve performance and avoid potential false positives or errors when new binary assets are added to the repository.
Consider adding common image, font, and archive formats to the list.
skip = .git*,*.svg,package-lock.json,*-lock.yaml,*.lock,*.css,.codespellrc,.cache,.npm,*.png,*.jpg,*.jpeg,*.gif,*.webp,*.ico,*.woff,*.woff2,*.ttf,*.eot,*.zip,*.gz
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.