diff --git a/.codespell/exclude-file.txt b/.codespell/exclude-file.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/.codespell/ignore-words.txt b/.codespell/ignore-words.txt new file mode 100644 index 0000000000..84171bfd52 --- /dev/null +++ b/.codespell/ignore-words.txt @@ -0,0 +1,4 @@ +ans +ure +clen +ser diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000000..dd495c65bd --- /dev/null +++ b/.codespellrc @@ -0,0 +1,10 @@ +# See: https://github.com/codespell-project/codespell#using-a-config-file +[codespell] +# In the event of a false positive, add the problematic word, in all lowercase, to 'ignore-words.txt' (one word per line). +# Or copy & paste the whole problematic line to 'exclude-file.txt' +ignore-words = .codespell/ignore-words.txt +exclude-file = .codespell/exclude-file.txt +check-filenames = +check-hidden = +count = +skip = .cproject,.git,./lib,./locale diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1905b233cf..c1a3a61387 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,6 +11,12 @@ repos: exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/espressif/esp-idf-config/.*|ports/espressif/boards/.*/sdkconfig)' - id: trailing-whitespace exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|lib/mbedtls_errors/.*)' +- repo: https://github.com/codespell-project/codespell + rev: v2.2.4 + hooks: + - id: codespell + #args: [-w] + exclude: ^locale/ - repo: local hooks: - id: translations