Skip to content

Commit

Permalink
Merge pull request #71 from viralpraxis/ci-spell-check
Browse files Browse the repository at this point in the history
Add spell checking to CI
  • Loading branch information
viralpraxis authored Dec 29, 2024
2 parents 534200d + dab7fce commit 215d0d2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/spell_checking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Spell Checking

on: [pull_request]

permissions: # added using https://github.com/step-security/secure-workflows
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
codespell:
name: Check spelling of all files with codespell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
with:
check_filenames: true
check_hidden: true
misspell:
name: Check spelling of all files in commit with misspell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install
run: wget -O - -q https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh | sh -s -- -b .
- name: Misspell
run: git ls-files --empty-directory | xargs ./misspell -error
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def some_method
it_behaves_like 'mutable objects', '%w(a b c)'
it_behaves_like 'mutable objects', '{ a: 1, b: 2 }'
it_behaves_like 'mutable objects', "'str'"
it_behaves_like 'mutable objects', %("\#{30 + 12}nd")
it_behaves_like 'mutable objects', %("\#{30 + 12}ok")

it_behaves_like 'immutable objects', '1'
it_behaves_like 'immutable objects', '2.1'
Expand Down Expand Up @@ -391,7 +391,7 @@ def some_method
it_behaves_like 'mutable objects', '%w(a b c)'
it_behaves_like 'mutable objects', '{ a: 1, b: 2 }'
it_behaves_like 'mutable objects', "'str'"
it_behaves_like 'mutable objects', %("\#{30 + 12}nd")
it_behaves_like 'mutable objects', %("\#{30 + 12}ok")
it_behaves_like 'mutable objects', 'Something.new'

it_behaves_like 'immutable objects', '1'
Expand Down

0 comments on commit 215d0d2

Please sign in to comment.