Calmcode - pre-commit: spelling


1 2 3 4 5 6 7 8 9 10

Keep in mind that the codespell hook is not a perfect spelling checking mechanism. It will merely look for common mistakes and it needs to be able to deal with code as well.

The config file now looks like this.

# See for more information
# See for more hooks
-   repo:
    rev: v2.4.0
    -   id: trailing-whitespace
    -   id: end-of-file-fixer
    -   id: check-yaml
    -   id: check-added-large-files
    -   id: check-ast
    -   id: check-json
-   repo:
    rev: 8f9b4931b9a28896fb43edccb23016a7540f5b82
    -   id: flake8
-   repo:
    rev: v1.16.0
    -   id: codespell
        name: codespell
        description: Checks for common misspellings in text files.
        entry: codespell --ignore-words ignore-spelling-words.txt
        language: python
        types: [text]

And this will be able to find spelling errors. Even the ones in your code!