Merge pull request #755 from yarikoptic/enh-codespell

Add codespell config (to ignore loved "poped") and github workflow to prevent future typos
This commit is contained in:
Povilas Kanapickas 2024-03-09 01:47:25 +02:00 committed by GitHub
commit d468f85fd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 29 additions and 1 deletions

4
.codespellrc Normal file
View File

@ -0,0 +1,4 @@
[codespell]
skip = .git,*.pdf,*.svg
# poped - loved variable name
ignore-words-list = poped

20
.github/workflows/codespell.yml vendored Normal file
View File

@ -0,0 +1,20 @@
---
name: Codespell
on:
push:
pull_request:
permissions:
contents: read
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v2

View File

@ -30,3 +30,7 @@ repos:
"-sn", # Don't display the score
"--rcfile=.pylintrc", # Link to your config file
]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell

View File

@ -35,7 +35,7 @@ $ pip install '.[devel]'
$ pre-commit install
```
4. Create a new branch, develop and add tests when possible
5. Run linting & testing before commiting code. Ensure all the hooks are passing.
5. Run linting & testing before committing code. Ensure all the hooks are passing.
```shell
$ pre-commit run --all-files
```