Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TypoCI/spellcheck-action
GitHub Action for checking code & Pull Requests for spelling mistakes
https://github.com/TypoCI/spellcheck-action
actionshackathon code-quality docker github-action ruby
Last synced: 3 months ago
JSON representation
GitHub Action for checking code & Pull Requests for spelling mistakes
- Host: GitHub
- URL: https://github.com/TypoCI/spellcheck-action
- Owner: TypoCI
- License: mit
- Created: 2020-08-17T17:12:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-03T10:46:53.000Z (about 3 years ago)
- Last Synced: 2024-09-14T14:34:50.042Z (4 months ago)
- Topics: actionshackathon, code-quality, docker, github-action, ruby
- Language: Ruby
- Homepage:
- Size: 2.13 MB
- Stars: 38
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Typo CI - Spellcheck Action
Checks for spelling mistakes within code via a GitHub Action**👉 If you'd like to use this Action without having to add any files to your repository, consider the [Typo CI GitHub App](https://github.com/marketplace/typo-ci/) 👈**
## Installation
Copy add the following to `.github/workflows/spellcheck.yml`:
```yml
# Add to: .github/workflows/spellcheck.yml
name: Typo CIon:
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:
```yml
# This is a sample .typo-ci.yml file, it's used to configure how Typo CI will behave.
# Add it to the root of your project and push it to github.
---# What language dictionaries should it use? By default Typo CI will select 'en' & 'en_GB'
# Currently Typo CI supports:
# de
# en
# en_GB
# es
# fr
# it
# nl
# pt
# pt_BR
# tr
dictionaries:
- en
- en_GB# Any files/folders we should ignore?
excluded_files:
- "vendor/**/*"
- "node_modules/**/*"
- "*.key"
- "*.enc"
- "*.min.css"
- "*.css.map"
- "*.min.js"
- "*.js.map"
- "*.mk"
- "package-lock.json"
- "yarn.lock"
- "Gemfile.lock"
- ".typo-ci.yml"
- ".github/.typo-ci.yml"# Any words we should ignore?
excluded_words:
- typoci# Would you like filenames to also be spellchecked?
spellcheck_filenames: true
```## Dictionaries
### Development Languages
To help the spell checker detect words that are valid in the programming world, I've created a collection of language specific dictionaries which are stored in [db/dict/contextual](https://github.com/TypoCI/spellcheck-action/tree/master/db/dict/contextual).
These are pragmatically generated by analysing open source projects.
### Spoken Language Dictionaries
The `en`, `en_GB` & `pt_BR` dictionaries were built from [https://github.com/en-wl/wordlist](https://github.com/en-wl/wordlist) and they are stored in [db/dict/imported](https://github.com/TypoCI/spellcheck-action/tree/master/db/dict/imported).
Other languages have been imported via NPM from [wooorm/dictionaries](https://github.com/wooorm/dictionaries).
## Testing
- Run `docker-compose run --rm web bin/setup` & `docker-compose run --rm web rspec`.