Add codespell as a pre-merge test

Open
#2,351 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
56/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
github-actions, python

Research direction

Start by reviewing the sample workflow in the issue and the repository’s existing GitHub Actions workflows. Check how documentation files are organized under docs/EN, then determine how the workflow should run codespell on pull requests to master and report typos while allowing merges. Done means the pre-merge check runs and flags spelling issues as described.

Written by the indexing model from the issue text.

Description

enhancement

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

Dominant language
Python
Stars
152
Forks
364
Avg merge
18h 59m
Merged PRs (30d)
35

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openaps/AndroidAPSdocs

All issues in openaps/AndroidAPSdocs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.