Skip to content

This repository contains a Docker image with the R spelling package

License

Notifications You must be signed in to change notification settings

AlexsLemonade/spellcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spellcheck

This repository contains a GitHub action to run the R spelling package. The role of this action is to facilitate spell checking actions across AlexsLemonade repositories.

Currently the action will only spell check text in Markdown (.md) and Rmarkdown (.Rmd) files.

Usage

To use this action, create a .github/workflows/spellcheck.yml file in your repository with the following contents (modified to fit your exact needs):

name: Check Spelling
on:
  pull_request:
    branches:
     - main

jobs:
  spell-check:
    runs-on: ubuntu-latest
    name: Spell check files
    steps:

      - name: Checkout
        uses: actions/checkout@v4

      - name: Spell check action
        uses: alexslemonade/spellcheck@v0
        id: spell
        with:
          dictionary: components/dictionary.txt

      - name: Upload spell check errors
        uses: actions/upload-artifact@v4
        with:
          name: spell_check_errors
          path: spell_check_errors.tsv

      - name: Fail if there are spelling errors
        if: steps.spell.outputs.error_count > 0
        run: |
          echo "There were ${{ steps.spell.outputs.error_count }} errors"
          exit 1

Note that the dictionary input to the spell check step is optional and defaults to components/dictionary.txt. If you want to use a different dictionary, you can specify the path to the dictionary file in your repository.

You can also specify specific files to spell check using the files input to the alexslemonade/spellcheck step. Note that the file extenstion restriction will still apply. Globs should work as expected.

About

This repository contains a Docker image with the R spelling package

Resources

License

Stars

Watchers

Forks

Packages