feat: replace codespell with typos#269
Merged
zeitlinger merged 7 commits intomainfrom May 6, 2026
Merged
Conversation
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
c2ffa5f to
9ebce3a
Compare
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR replaces Flint’s spelling checker integration from codespell to typos, including updating the check registry/tooling, adding a Flint-owned _typos.toml config flow, and introducing a Flint-native migration from legacy .codespellrc / .codespellignore.
Changes:
- Register a new
typoscheck (invoked with--force-exclude) and removecodespellfrom the built-in registry. - Add a setup migration that converts legacy Codespell ignore-word settings into
FLINT_CONFIG_DIR/_typos.tomland removes legacy files. - Update documentation, Renovate tracking, and test fixtures to reflect
typosbehavior (including fix-mode cases).
Reviewed changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/cases/typos/failure/test.toml | Adds failing typos case expectations/output matching. |
| tests/cases/typos/failure/files/README.md | Fixture file containing a known typo (teh). |
| tests/cases/typos/failure/files/mise.toml | Installs typos in fixture toolchain. |
| tests/cases/typos/clean/test.toml | Updates clean spelling case to run typos instead of codespell. |
| tests/cases/typos/clean/files/README.md | Clean spelling fixture content. |
| tests/cases/typos/clean/files/mise.toml | Installs typos in clean-case fixture. |
| tests/cases/typos/auto-fix/test.toml | Adds typos auto-fix case expectations. |
| tests/cases/typos/auto-fix/files/README.md | Fixture file for auto-fix (teh → the). |
| tests/cases/typos/auto-fix/files/mise.toml | Installs typos in auto-fix fixture. |
| tests/cases/general/unsupported-typos-config/test.toml | Adds failure case for unsupported .typos.toml config location. |
| tests/cases/general/unsupported-typos-config/files/mise.toml | Installs typos for unsupported-config fixture. |
| tests/cases/general/unsupported-typos-config/files/.typos.toml | Adds unsupported config file fixture. |
| tests/cases/general/unsupported-codespellrc-config/test.toml | Adds failure case for legacy .codespellrc now treated as unsupported for typos. |
| tests/cases/general/unsupported-codespellrc-config/files/mise.toml | Installs typos for legacy-config fixture. |
| tests/cases/general/unsupported-codespellrc-config/files/.codespellrc | Adds legacy codespell config fixture. |
| tests/cases/general/unsupported-codespell-config/test.toml | Removes obsolete codespell unsupported-config test. |
| tests/cases/general/unsupported-codespell-config/files/setup.cfg | Removes obsolete codespell config fixture. |
| tests/cases/general/unsupported-codespell-config/files/mise.toml | Removes obsolete codespell tool fixture. |
| tests/cases/general/init-idempotent/files/mise.toml | Updates init-idempotent fixture to include typos instead of pipx:codespell. |
| tests/cases/general/flint-setup-obsolete-key/test.toml | Updates expected stdout for additional tool key replacements/normalization messaging. |
| tests/cases/general/flint-setup-codespell-config-migration/test.toml | Adds end-to-end fixture validating Codespell→Typos config migration output. |
| tests/cases/general/flint-setup-codespell-config-migration/files/mise.toml | Fixture includes typos tool and FLINT_CONFIG_DIR. |
| tests/cases/general/flint-setup-codespell-config-migration/files/.codespellrc | Legacy codespellrc fixture input for migration. |
| tests/cases/general/flint-setup-codespell-config-migration/files/.codespellignore | Legacy ignore-words file fixture input for migration. |
| tests/cases/codespell/failure/test.toml | Removes codespell failure fixture coverage. |
| tests/cases/codespell/failure/files/README.md | Removes codespell failure README fixture. |
| tests/cases/codespell/failure/files/mise.toml | Removes codespell tool fixture. |
| tests/cases/codespell/clean/files/README.md | Removes codespell clean README fixture. |
| tests/cases/codespell/clean/files/mise.toml | Removes codespell clean tool fixture. |
| tests/cases/codespell/clean/files/.github/config/.codespellrc | Removes codespell config fixture. |
| src/registry/checks.rs | Replaces codespell check registration with typos, including unsupported config detection and tool key migration list. |
| src/main.rs | Updates embedded examples/table output to list typos instead of codespell. |
| src/linters/typos.rs | Introduces typos init hook and Codespell→Typos config migration implementation + unit tests. |
| src/linters/renovate_deps/tests.rs | Renames a test for correct spelling (“unparsable”). |
| src/linters/mod.rs | Exposes new typos module. |
| src/linters/flint_setup.rs | Ensures setup migration drift is detected even when no other errors are present. |
| src/init/tests.rs | Updates expectations to reflect toolchain changes (typos vs pipx:codespell). |
| src/init/mod.rs | Updates profile/category labels to mention typos. |
| src/init/migrations.rs | Integrates typos migration into setup migration detection/application flow and message printing. |
| README.md | Updates the registry table to list typos and removes codespell. |
| mise.toml | Replaces pipx:codespell with typos for repo tooling. |
| docs/linters.md | Removes codespell docs section and adds typos docs section. |
| default.json | Updates Renovate preset tool list to include typos instead of pipx:codespell. |
| .github/renovate.json5 | Updates Renovate config tool grouping to include typos. |
| .github/renovate-tracked-deps.json | Removes tracking for pipx:codespell and adds tracking for typos (GitHub releases). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
martincostello
approved these changes
May 6, 2026
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.
What changed
This replaces Flint's
codespellintegration withtypos.typosinstead ofcodespellaqua:crate-ci/typos_typos.tomlas Flint-owned configtyposwith--force-excludecodespellfixture coverage with realtypos-backed casesConfig migration
For maintained repos, Flint now does a Flint-native migration from legacy Codespell config:
ignore-words-list.codespellignoreskipcheck-hiddenThis keeps the generated Typos config aligned with how Flint invokes the checker, rather than preserving standalone Codespell traversal behavior.
Validation
cargo testmise run lint:fixmise run lintmox) for the config migration flowFollow-up
The smoke test exposed one remaining issue outside this PR's scope: when migrating
mise.toml, a legacypipx:codespellversion string is currently preserved verbatim when rewriting toaqua:crate-ci/typos, which can produce an invalid Typos version. That should be fixed in a follow-up.