Skip to content

Add codespell as a pre-merge test #2351

@shoaib42

Description

@shoaib42

I went through a lot of typos in the docs and I'd like to suggest that we have a pre-check github action before the maintainer merges. The check will allow the contributor to fix their typos, thereby getting a cleaner commit in the first go.

My PR shows how things can get over time :)

Here is a sample I whipped up.

name: Codespell Pre-Check

on:
  pull_request:
    branches: [ master ]

jobs:
  spellcheck:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install codespell
        run: pip install codespell

      - name: Run codespell
        continue-on-error: true  # <== Allows merge but flags typos
        run: codespell --ignore-words-list="Equil,dependant,Chek,LimiTTer,BU" docs/EN

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions