Skip to content

Commit

Permalink
feat(CI): add spell checker GitHub Action
Browse files Browse the repository at this point in the history
- Run linters/spell checker only on pull request
- Update the CONTRIBUTING guide with documentation on the Golang library `misspell`
  • Loading branch information
jbampton committed Jan 26, 2021
1 parent abc786c commit 28b9c81
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Lint

on: [push, pull_request]
on: [pull_request]

jobs:
markdownlint:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/spell-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 🎉 Spellchecker

on: [pull_request]

jobs:
misspell:
name: 🧹 Check Spelling
runs-on: ubuntu-latest
steps:
- name: 🍄 Check Out
uses: actions/checkout@v2
- name: 🥑 Install
run: |
wget -O - -q https://git.io/misspell | sh -s -- -b .
- name: 🍊 Misspell
run: |
find . -type f | xargs ./misspell
15 changes: 12 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,30 @@ So far we are only checking Markdown files in the pre-commit run.
- [Markdownlint](https://www.npmjs.com/package/markdownlint-cli)
- [Shellcheck](https://github.com/koalaman/shellcheck)
- [yamllint](https://yamllint.readthedocs.io/en/stable/)
- [Spell Checker](https://github.com/client9/misspell)

We use `markdownlint` to lint the [Markdown](https://daringfireball.net/projects/markdown/):

```
markdownlint '**/*.md' --ignore node_modules --fix
```

We use `shellcheck` to lint the [shell script](https://en.wikipedia.org/wiki/Shell_script) files:

```
shellcheck donya.sh
```

We also use `yamllint` to lint the [YAML](https://yaml.org/) files:

```
yamllint .
```

We use `shellcheck` to lint the [shell script](https://en.wikipedia.org/wiki/Shell_script) files:
We use `misspell` to check for spelling mistakes:

```shell
find . -type f | xargs ./misspell
```
shellcheck donya.sh
```

Pass in `-w` to `misspell` for autocorrect.

0 comments on commit 28b9c81

Please sign in to comment.