AndroidAPSdocs icon indicating copy to clipboard operation
AndroidAPSdocs copied to clipboard

Add codespell as a pre-merge test

Open shoaib42 opened this issue 10 months ago • 0 comments

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

shoaib42 avatar Feb 23 '25 20:02 shoaib42