devtools: Add codespell to pre-commit.
What changed, and why it matters
This commit adds a spelling-check tool called codespell to the project's pre-commit hooks. It only touches configuration files for checking typos in documentation and source comments, and does not change any actual Lightning node code. There is no security relevance.
No security action needed; this is a routine developer-tooling change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds .codespellignore, .codespellrc, and a codespell hook entry in .pre-commit-config.yaml. The hook runs in manual stage, excludes ccan/, contrib/, and tests/fuzz/corpora, and uses codespell v2.3.0. No source code, build scripts, or runtime behavior is modified.
Changed components
.pre-commit-config.yaml.codespellrc.codespellignoreInspect captured patch +15 / −0
diff --git a/.codespellignore b/.codespellignore
new file mode 100644
index 00000000..972d0b25
--- /dev/null
+++ b/.codespellignore
@@ -0,0 +1,3 @@
+connectd
+crate
+mut
diff --git a/.codespellrc b/.codespellrc
new file mode 100644
index 00000000..092dcccf
--- /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 0f8dc272..7a99d261 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.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.