Skip to content

Commit

Permalink
ci: add pre-commit hook for codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdragun authored and radimkarnis committed Feb 20, 2024
1 parent 31eb15b commit 6d309e1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[codespell]
skip = *.bin,test/images/efuse/*,docs/en/espefuse/inc/*
ignore-words-list = bloc,ser,dout,exten
write-changes = false
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ repos:
- id: sphinx-lint
name: Lint RST files in docs folder using Sphinx Lint
files: ^((docs/en)/.*\.(rst|inc))|CONTRIBUTING.rst$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
- repo: https://github.com/espressif/conventional-precommit-linter
rev: v1.4.0
hooks:
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ Shinx-lint

The documentation is checked for stylistic and formal issues by ``sphinx-lint``.


Codespell check
"""""""""""""""

This repository utilizes an automatic `spell checker <https://github.com/codespell-project/codespell>`_ integrated into the pre-commit process. If any spelling issues are detected, the recommended corrections will be applied automatically to the file, ready for commit.
In the event of false positives, you can adjust the configuration in the `.codespell.rc`. To exclude files from the spell check, utilize the `skip` keyword followed by comma-separated paths to the files (wildcards are supported). Additionally, to exclude specific words from the spell check, employ the `ignore-words-list` keyword followed by comma-separated words to be skipped.


Automated Integration Tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit 6d309e1

Please sign in to comment.