lint: Remove confusing, redundant, and brittle lint-spelling

This commit is contained in:
MarcoFalke 2025-12-12 09:13:40 +01:00
parent d155fc12a0
commit fa904fc683
No known key found for this signature in database
4 changed files with 0 additions and 74 deletions

View File

@ -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 \

View File

@ -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)

View File

@ -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()

View File

@ -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