I hate having spelling mistakes in my code. I want to make sure the next person to sees my work has as few barriers to understanding it as possible. Plus as a bonus benefit, I like to discourage people from making weird abbreviations.
The GitHub Action I'm working on will expand on a GitHub Application I wrote, which can spell check commits when code is pushed to GitHub or a Pull Request is made.
My Workflow
I'm leveraging the Hunspell library via Ruby to check against language specific dictionaries along with a few custom dictionaries I'd previous built for my GitHub Application which does the same thing.
The aspects I'm mainly focusing on are:
- Making it work as a GitHub Action
- Use Docker, but make sure it's super fast
- Come up with a way people can contribute to the dictionaries easily
- I want to add a license aspect, so I can earn some cash from people using my GitHub Action while still staying Open Source.
# Add to: .github/workflows/spellcheck.yml
name: Typo CI
on:
  push:
    branches:
      - master
  pull_request:
jobs:
  spellcheck:
    name: Typo CI (GitHub Action)
    runs-on: ubuntu-latest
    timeout-minutes: 4
    if: "!contains(github.event.head_commit.message, '[ci skip]')"
    steps:
    - name: TypoCheck
      uses: typoci/spellcheck-action@master
      # with:
        # A license can be purchased via:
        # https://gumroad.com/l/MvvBE
        # typo_ci_license_key: ${{ secrets.TYPO_CI_LICENSE_KEY }}
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Submission Category:
Maintainer Must-Haves
Link to Code
       TypoCI
       / 
        spellcheck-action
      
        TypoCI
       / 
        spellcheck-action
      
    
    GitHub Action for checking code & Pull Requests for spelling mistakes
Typo CI - Spellcheck Action
Checks for spelling mistakes within code via a GitHub Action
Installation
Copy add the following to .github/workflows/spellcheck.yml:
# Add to: .github/workflows/spellcheck.yml
name: Typo CI
on
  push:
    branches-ignore:
      - master
jobs:
  spellcheck:
    name: Typo CI (GitHub Action)
    runs-on: ubuntu-latest
    timeout-minutes: 4
    if: "!contains(github.event.head_commit.message, '[ci skip]')"
    steps:
    - name: TypoCheck
      uses: typoci/spellcheck-action@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Configuration
You can tweak how Typo CI analyses your code by adding a .typo-ci.yml file to the root of your repository (You can also add it within your .github folder). Here is a sample file:
# This is a sample .typo-ci.yml file, it's used to configure how Typo…Additional Resources / Info
My GitHub: https://github.com/MikeRogers0
The Original Marketplace App: https://github.com/marketplace/typo-ci
 

 
    
Top comments (3)
Oh hey! I am from V Community and we are using this! Thanks for making this Actions
Thank you :D
This is great. 🌟💯