Skip to content

Add codespell support with configuration and fixes - #53

Open
yarikoptic wants to merge 5 commits into
boyter:masterfrom
yarikoptic:enh-codespell
Open

yarikoptic wants to merge 5 commits into
boyter:masterfrom
yarikoptic:enh-codespell

Conversation

@yarikoptic

Copy link
Copy Markdown

Summary

Add codespell configuration, a CI workflow that runs it on pushes and PRs to master, and fixes for the existing typos. The workflow's permissions are read-only, so it should be safe to add. I've added codespell to over a hundred projects, and the feedback has mostly been positive (see the improveit-dashboard).

The verbatim SPDX license texts (assets/database/licenses/, database_keywords.json, and processor/constants.go, which embeds them) are skipped. They are upstream texts, some of them not in English, and must stay byte-identical. All typo fixes are in docs and comments. None of them changes behavior.

Details

Configuration (.codespellrc)

  • skip: .git, .git-meta, .*cache, go.sum, vendor, *.lock, plus the license databases above
  • ignore-words-list (each entry has a comment):
    • te: loop variable in processor/detector_license.go
    • dependenices: verbatim typo in honk's license text, used as a test fixture in pkg/license_test.go
  • inline codespell:ignore in lc.go for the misspelled license filenames lisence/lisense that the tool deliberately matches

Typo fixes

  • fixed by hand (codespell doesn't catch these): altunate → alternate, SDPX → SPDX, has has → has
  • fixed by codespell -w, recorded with datalad run so it can be rerun: seperated, souce, exmaple, matchs, extention, ouput, addtional, resonable

Historical context

The git history already has about 6 commits that fixed typos by hand.

Test plan

  • codespell passes with zero errors
  • codespell's extra dictionaries (--builtin clear,rare,usage,code,names) found nothing worth changing (only master, iff, ws)

🤖 Generated with Claude Code and love to typos free code

yarikoptic and others added 5 commits October 20, 2026 15:59
…lings

- skip verbatim SPDX license texts (assets/database/licenses/,
  database_keywords.json and processor/constants.go which embeds them),
  plus .git-meta and .*cache
- ignore "te" (loop variable) and "dependenices" (verbatim typo in a
  real-world license fixture in pkg/license_test.go)
- inline pragma for intentionally misspelled license filenames in lc.go

Co-Authored-By: Claude Code 2.1.305 / Claude Opus 5.5 <noreply@anthropic.com>
- altunate -> alternate (CONTRIBUTING.md)
- SDPX -> SPDX (CONTRIBUTING.md, what-we-look-at.md)
- "has has" -> "has" (NOTES.md)

Co-Authored-By: Claude Code 2.1.305 / Claude Opus 5.5 <noreply@anthropic.com>
Fixed typos:
- seperated -> separated (README.md, lc.go)
- souce -> source, exmaple -> example (CONTRIBUTING.md)
- matchs -> matches, extention -> extension (NOTES.md)
- ouput -> output, addtional -> additional (README.md)
- resonable -> reasonable (assets/database/README.md)

Co-Authored-By: Claude Code 2.1.305 / Claude Opus 5.5 <noreply@anthropic.com>

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "uvx codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^
@pr-insights pr-insights Bot added M/complexity Normal or medium complexity M/size Normal or medium sized change labels Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

M/complexity Normal or medium complexity M/size Normal or medium sized change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant