Skip to content

chore: migrate from codespell to typos#17501

Merged
mattsse merged 3 commits intomainfrom
migrate-codespell-to-typos
Jul 21, 2025
Merged

chore: migrate from codespell to typos#17501
mattsse merged 3 commits intomainfrom
migrate-codespell-to-typos

Conversation

@mattsse
Copy link
Collaborator

@mattsse mattsse commented Jul 19, 2025

Migrates the spellcheck tooling from codespell to typos, following the same approach as foundry-rs/foundry#11045.

Summary

This PR replaces codespell with typos for improved performance and more flexible configuration. The typos tool is written in Rust and provides faster execution times along with better support for ignoring false positives through regex patterns.

Changes

  • Replace codespell GitHub Action with crate-ci/typos@v1 in the lint workflow
  • Create typos.toml configuration with:
    • Equivalent file exclusions from .codespellrc
    • Regex patterns to ignore hex strings and ordinals
    • Allowed words for project-specific terms and false positives
  • Update Makefile to use lint-typos target instead of lint-codespell
  • Remove obsolete .codespellrc configuration
  • Fix actual typo found during migration: evnenv in trace.rs documentation

The configuration maintains all existing exclusions and adds patterns to handle common false positives in the codebase.

cc @DaniPopes

Migrates the spellcheck tooling from codespell to typos for improved
performance and more flexible configuration.

Changes:
- Replace codespell GitHub Action with typos
- Create typos.toml configuration with equivalent settings
- Update Makefile targets from lint-codespell to lint-typos
- Remove old .codespellrc configuration
- Fix actual typo: evn -> env in trace.rs documentation
@mattsse mattsse added the A-ci Related to github workflows or other build and lint tools label Jul 19, 2025
@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Jul 19, 2025
@mattsse mattsse merged commit bec4510 into main Jul 21, 2025
43 checks passed
@mattsse mattsse deleted the migrate-codespell-to-typos branch July 21, 2025 09:18
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Jul 21, 2025
emhane added a commit to op-rs/kona that referenced this pull request Aug 5, 2025
This PR implements a comprehensive spellcheck workflow using the `typos`
tool, following the same approach as
[paradigmxyz/reth#17501](paradigmxyz/reth#17501).

## Changes

**GitHub Actions Integration:**
- Added `typos` job to existing `rust_ci.yaml` workflow
- Runs on all PRs with 30-minute timeout

**Configuration (`typos.toml`):**
- Excludes build artifacts, git files, and generated content
- Excludes `*.go` files
- Allows project-specific terminology (kona, asterisc, cannon,
superchain, etc.)

**Local Development Support:**
- Added `just lint-typos` target for local spell checking with

**Codebase Cleanup:**
- Fixed all existing typos throughout the codebase (15 files affected)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emhane <58548332+emhane@users.noreply.github.com>
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Emilia Hane <undefined@users.noreply.github.com>
github-merge-queue bot pushed a commit to alloy-rs/op-alloy that referenced this pull request Aug 18, 2025
This PR adds a spellcheck job to the lint workflow using the `typos`
tool, following the same approach as
[Reth](paradigmxyz/reth#17501) and
[Kona](op-rs/kona#2605).

## Changes

- **Added `typos` job to `.github/workflows/lint.yml`**: Uses
`crate-ci/typos@v1` action to check spelling across all files in PRs
- **Created `typos.toml` configuration**: Includes
blockchain/Ethereum-specific terms and exclusions for:
  - Generated files (minified JS, build artifacts)
  - Hex strings and addresses common in blockchain projects
- Technical terms like `asterisc`, `optimism`, `alloy`, `superchain`,
etc.
- **Fixed existing typos** found during implementation:
  - `existant` → `existent` in CSS
  - `rountrip` → `roundtrip` in changelog
  - `datas` → `data` in changelog

## Why typos?

The `typos` tool is written in Rust and provides faster execution than
`codespell` while offering better configuration options through regex
patterns and word lists. It's specifically well-suited for Rust projects
with blockchain terminology.

## Testing

The configuration has been tested to ensure:
- ✅ Catches actual spelling errors
- ✅ Allows legitimate technical terms
- ✅ Excludes generated/minified files
- ✅ Integrates cleanly with existing lint workflow

Fixes #584.

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/alloy-rs/op-alloy/issues/new?title=✨Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emhane <58548332+emhane@users.noreply.github.com>
matrix-rider609op added a commit to matrix-rider609op/kona that referenced this pull request Sep 29, 2025
This PR implements a comprehensive spellcheck workflow using the `typos`
tool, following the same approach as
[paradigmxyz/reth#17501](paradigmxyz/reth#17501).

## Changes

**GitHub Actions Integration:**
- Added `typos` job to existing `rust_ci.yaml` workflow
- Runs on all PRs with 30-minute timeout

**Configuration (`typos.toml`):**
- Excludes build artifacts, git files, and generated content
- Excludes `*.go` files
- Allows project-specific terminology (kona, asterisc, cannon,
superchain, etc.)

**Local Development Support:**
- Added `just lint-typos` target for local spell checking with

**Codebase Cleanup:**
- Fixed all existing typos throughout the codebase (15 files affected)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emhane <58548332+emhane@users.noreply.github.com>
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Emilia Hane <undefined@users.noreply.github.com>
aPTRDgvm5ui3dkEtFYWc added a commit to aPTRDgvm5ui3dkEtFYWc/kona that referenced this pull request Oct 2, 2025
This PR implements a comprehensive spellcheck workflow using the `typos`
tool, following the same approach as
[paradigmxyz/reth#17501](paradigmxyz/reth#17501).

## Changes

**GitHub Actions Integration:**
- Added `typos` job to existing `rust_ci.yaml` workflow
- Runs on all PRs with 30-minute timeout

**Configuration (`typos.toml`):**
- Excludes build artifacts, git files, and generated content
- Excludes `*.go` files
- Allows project-specific terminology (kona, asterisc, cannon,
superchain, etc.)

**Local Development Support:**
- Added `just lint-typos` target for local spell checking with

**Codebase Cleanup:**
- Fixed all existing typos throughout the codebase (15 files affected)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emhane <58548332+emhane@users.noreply.github.com>
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Emilia Hane <undefined@users.noreply.github.com>
docker-dragonmj9ol added a commit to docker-dragonmj9ol/op-alloy that referenced this pull request Nov 6, 2025
This PR adds a spellcheck job to the lint workflow using the `typos`
tool, following the same approach as
[Reth](paradigmxyz/reth#17501) and
[Kona](op-rs/kona#2605).

## Changes

- **Added `typos` job to `.github/workflows/lint.yml`**: Uses
`crate-ci/typos@v1` action to check spelling across all files in PRs
- **Created `typos.toml` configuration**: Includes
blockchain/Ethereum-specific terms and exclusions for:
  - Generated files (minified JS, build artifacts)
  - Hex strings and addresses common in blockchain projects
- Technical terms like `asterisc`, `optimism`, `alloy`, `superchain`,
etc.
- **Fixed existing typos** found during implementation:
  - `existant` → `existent` in CSS
  - `rountrip` → `roundtrip` in changelog
  - `datas` → `data` in changelog

## Why typos?

The `typos` tool is written in Rust and provides faster execution than
`codespell` while offering better configuration options through regex
patterns and word lists. It's specifically well-suited for Rust projects
with blockchain terminology.

## Testing

The configuration has been tested to ensure:
- ✅ Catches actual spelling errors
- ✅ Allows legitimate technical terms
- ✅ Excludes generated/minified files
- ✅ Integrates cleanly with existing lint workflow

Fixes #584.

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/alloy-rs/op-alloy/issues/new?title=✨Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emhane <58548332+emhane@users.noreply.github.com>
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
…s/kona#2606)

This PR implements a comprehensive spellcheck workflow using the `typos`
tool, following the same approach as
[paradigmxyz/reth#17501](paradigmxyz/reth#17501).

## Changes

**GitHub Actions Integration:**
- Added `typos` job to existing `rust_ci.yaml` workflow
- Runs on all PRs with 30-minute timeout

**Configuration (`typos.toml`):**
- Excludes build artifacts, git files, and generated content
- Excludes `*.go` files
- Allows project-specific terminology (kona, asterisc, cannon,
superchain, etc.)

**Local Development Support:**
- Added `just lint-typos` target for local spell checking with

**Codebase Cleanup:**
- Fixed all existing typos throughout the codebase (15 files affected)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emhane <58548332+emhane@users.noreply.github.com>
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Emilia Hane <undefined@users.noreply.github.com>
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
…s/kona#2606)

This PR implements a comprehensive spellcheck workflow using the `typos`
tool, following the same approach as
[paradigmxyz/reth#17501](paradigmxyz/reth#17501).

## Changes

**GitHub Actions Integration:**
- Added `typos` job to existing `rust_ci.yaml` workflow
- Runs on all PRs with 30-minute timeout

**Configuration (`typos.toml`):**
- Excludes build artifacts, git files, and generated content
- Excludes `*.go` files
- Allows project-specific terminology (kona, asterisc, cannon,
superchain, etc.)

**Local Development Support:**
- Added `just lint-typos` target for local spell checking with

**Codebase Cleanup:**
- Fixed all existing typos throughout the codebase (15 files affected)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emhane <58548332+emhane@users.noreply.github.com>
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Emilia Hane <undefined@users.noreply.github.com>
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 21, 2026
This PR adds a spellcheck job to the lint workflow using the `typos`
tool, following the same approach as
[Reth](paradigmxyz/reth#17501) and
[Kona](op-rs/kona#2605).

## Changes

- **Added `typos` job to `.github/workflows/lint.yml`**: Uses
`crate-ci/typos@v1` action to check spelling across all files in PRs
- **Created `typos.toml` configuration**: Includes
blockchain/Ethereum-specific terms and exclusions for:
  - Generated files (minified JS, build artifacts)
  - Hex strings and addresses common in blockchain projects
- Technical terms like `asterisc`, `optimism`, `alloy`, `superchain`,
etc.
- **Fixed existing typos** found during implementation:
  - `existant` → `existent` in CSS
  - `rountrip` → `roundtrip` in changelog
  - `datas` → `data` in changelog

## Why typos?

The `typos` tool is written in Rust and provides faster execution than
`codespell` while offering better configuration options through regex
patterns and word lists. It's specifically well-suited for Rust projects
with blockchain terminology.

## Testing

The configuration has been tested to ensure:
- ✅ Catches actual spelling errors
- ✅ Allows legitimate technical terms
- ✅ Excludes generated/minified files
- ✅ Integrates cleanly with existing lint workflow

Fixes #584.

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/alloy-rs/op-alloy/issues/new?title=✨Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emhane <58548332+emhane@users.noreply.github.com>
edge-scripter8980 added a commit to edge-scripter8980/kona that referenced this pull request Feb 5, 2026
This PR implements a comprehensive spellcheck workflow using the `typos`
tool, following the same approach as
[paradigmxyz/reth#17501](paradigmxyz/reth#17501).

## Changes

**GitHub Actions Integration:**
- Added `typos` job to existing `rust_ci.yaml` workflow
- Runs on all PRs with 30-minute timeout

**Configuration (`typos.toml`):**
- Excludes build artifacts, git files, and generated content
- Excludes `*.go` files
- Allows project-specific terminology (kona, asterisc, cannon,
superchain, etc.)

**Local Development Support:**
- Added `just lint-typos` target for local spell checking with

**Codebase Cleanup:**
- Fixed all existing typos throughout the codebase (15 files affected)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emhane <58548332+emhane@users.noreply.github.com>
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Emilia Hane <undefined@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ci Related to github workflows or other build and lint tools

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants