lint: Remove confusing, redundant, and brittle lint-spelling
What changed, and why it matters
This commit removes a spelling-check tool (codespell) from Bitcoin Core's automated linting setup. It deletes the lint-spelling.py script, its word-ignore list, and the codespell dependency from CI install scripts. There is no change to the actual Bitcoin node software, wallet logic, networking, or consensus code. It is purely a cleanup of developer tooling.
No security action required. Reviewers may want to confirm that another spelling/grammar check is in place if project policy desires one, but removal itself does not introduce a vulnerability.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit deletes test/lint/lint-spelling.py and test/lint/spelling.ignore-words.txt, removes codespell==2.4.1 from ci/lint/01_install.sh, and updates test/lint/README.md to drop the codespell entry. The removed script only warned about spelling errors and exited successfully regardless. No runtime, consensus, cryptographic, or network code is modified.
Changed components
ci/lint/01_install.shtest/lint/README.mdtest/lint/lint-spelling.pytest/lint/spelling.ignore-words.txtInspect captured patch +0 / −74
diff --git a/ci/lint/01_install.sh b/ci/lint/01_install.sh
index fc422675..0cf9fbb4 100755
--- a/ci/lint/01_install.sh
+++ b/ci/lint/01_install.sh
@@ -40,7 +40,6 @@ command -v python3
python3 --version
${CI_RETRY_EXE} pip3 install \
- codespell==2.4.1 \
lief==0.16.6 \
mypy==1.18.2 \
pyzmq==27.1.0 \
diff --git a/test/lint/README.md b/test/lint/README.md
index 1858a2c0..e28eda1f 100644
--- a/test/lint/README.md
+++ b/test/lint/README.md
@@ -50,7 +50,6 @@ or `--help`:
| [`lint-python.py`](/test/lint/lint-python.py) | [pyzmq](https://github.com/zeromq/pyzmq)
| [`lint-python-dead-code.py`](/test/lint/lint-python-dead-code.py) | [vulture](https://github.com/jendrikseipp/vulture)
| [`lint-shell.py`](/test/lint/lint-shell.py) | [ShellCheck](https://github.com/koalaman/shellcheck)
-| [`lint-spelling.py`](/test/lint/lint-spelling.py) | [codespell](https://github.com/codespell-project/codespell)
| `py_lint` | [ruff](https://github.com/astral-sh/ruff)
| markdown link check | [mlc](https://github.com/becheran/mlc)
diff --git a/test/lint/lint-spelling.py b/test/lint/lint-spelling.py
deleted file mode 100755
index cd34162c..00000000
--- a/test/lint/lint-spelling.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python3
-#
-# Copyright (c) 2022-present The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-"""
-Warn in case of spelling errors.
-Note: Will exit successfully regardless of spelling errors.
-"""
-
-from subprocess import check_output, STDOUT, CalledProcessError
-
-from lint_ignore_dirs import SHARED_EXCLUDED_SUBTREES
-
-IGNORE_WORDS_FILE = 'test/lint/spelling.ignore-words.txt'
-FILES_ARGS = ['git', 'ls-files', '--', ":(exclude)contrib/seeds/*.txt", ":(exclude)depends/", ":(exclude)doc/release-notes/", ":(exclude)src/qt/locale/", ":(exclude)src/qt/*.qrc", ":(exclude)contrib/guix/patches"]
-FILES_ARGS += [f":(exclude){dir}" for dir in SHARED_EXCLUDED_SUBTREES]
-
-
-def check_codespell_install():
- try:
- check_output(["codespell", "--version"])
- except FileNotFoundError:
- print("Skipping spell check linting since codespell is not installed.")
- exit(0)
-
-
-def main():
- check_codespell_install()
-
- files = check_output(FILES_ARGS, text=True).splitlines()
- codespell_args = ['codespell', '--check-filenames', '--disable-colors', '--quiet-level=7', '--ignore-words={}'.format(IGNORE_WORDS_FILE)] + files
-
- try:
- check_output(codespell_args, stderr=STDOUT, text=True)
- except CalledProcessError as e:
- print(e.output, end="")
- print('^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in {}'.format(IGNORE_WORDS_FILE))
-
-
-if __name__ == "__main__":
- main()
diff --git a/test/lint/spelling.ignore-words.txt b/test/lint/spelling.ignore-words.txt
deleted file mode 100644
index fe08eabe..00000000
--- a/test/lint/spelling.ignore-words.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-afile
-amountIn
-anc
-blockin
-bu
-cachable
-clen
-debbugs
-deques
-fo
-hashIn
-hights
-incomin
-invokable
-lief
-mor
-nd
-nin
-ot
-outIn
-requestor
-ser
-siz
-stap
-unparseable
-unser
-useable
-viewIn
-wit
\ No newline at end of file
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.