From 969bd22d2f4dbece2b3d4ce4ab65f373513deb2e Mon Sep 17 00:00:00 2001 From: Se7enZ Date: Mon, 16 Dec 2024 19:13:38 +0100 Subject: [PATCH] devtools: Add codespell to pre-commit. Includes default config file and an initial word list to ignore. --- .codespellignore | 3 +++ .codespellrc | 4 ++++ .pre-commit-config.yaml | 8 ++++++++ 3 files changed, 15 insertions(+) create mode 100644 .codespellignore create mode 100644 .codespellrc diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 000000000..972d0b259 --- /dev/null +++ b/.codespellignore @@ -0,0 +1,3 @@ +connectd +crate +mut diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..092dcccfc --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] + +count = true +ignore-words = .codespellignore diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0f8dc272e..7a99d2610 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,6 +18,14 @@ repos: - id: shellcheck args: [ -fgcc ] +- repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + description: Checks for common misspellings. + exclude: ccan|contrib|tests/fuzz/corpora + stages: [ manual ] + - repo: local hooks: # Reimplementation of `make check-amount-access` for pygrep.