From 41003eea13948e027dcf7c252b3beed77240d974 Mon Sep 17 00:00:00 2001 From: Se7enZ Date: Mon, 16 Dec 2024 19:13:38 +0100 Subject: [PATCH] chore: Add codespell to pre-commit. Includes default config file and an initial word list to ignore. --- .codespellignore | 3 +++ .codespellrc | 4 ++++ .pre-commit-config.yaml | 7 +++++++ 3 files changed, 14 insertions(+) create mode 100644 .codespellignore create mode 100644 .codespellrc diff --git a/.codespellignore b/.codespellignore new file mode 100644 index 000000000000..972d0b2596ab --- /dev/null +++ b/.codespellignore @@ -0,0 +1,3 @@ +connectd +crate +mut diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000000..092dcccfc418 --- /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 a0732f3d0f95..d33ba8f8f50b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,6 +30,13 @@ repos: entry: clang-format types: [ c ] +- 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 + - repo: local hooks: # Reimplementation of `make check-amount-access` for pygrep.