Skip to content

Commit f52f427

Browse files
committed
Merge #20817: lint: update list of spelling linter false positives, bump to codespell 2.0.0
f3ba916 lint: ignore gitian keys file for spelling linter (Sebastian Falbesoner) da289a6 lint: update list of spelling linter false positives (Sebastian Falbesoner) a0022f1 test: bump codespell linter version to 2.0.0 (Sebastian Falbesoner) Pull request description: This small patch updates the ignore list for the spelling linter script (which uses `codespell`), both removing false-positives that are not relevant anymore and adding new ones. As [suggested by jonatack](bitcoin/bitcoin#20762 (comment), whose last name is now also part of the list :)~~. Also changed the linter script to not check the gitian keys file, as [suggested by hebasto](bitcoin/bitcoin#20817 (comment)). The codespell version used is bumped to most recent version 2.0.0, which is more aware of some terms that were previously needed in the ignorelist for v1.17.1, see bitcoin/bitcoin#20817 (comment). Running spelling linter on master branch (repeated findings in the same file are removed to keep the output short): ``` $ ./test/lint/lint-spelling.sh contrib/gitian-keys/keys.txt:16: Atack ==> Attack doc/developer-notes.md:1284: inout ==> input, in out doc/psbt.md:122: Asend ==> Ascend, as end src/bench/verify_script.cpp:27: Keypair ==> Key pair src/blockencodings.h:30: Unser ==> Under, unset, unsure, user src/compressor.h:65: Unser ==> Under, unset, unsure, user src/core_read.cpp:131: presense ==> presence src/index/disktxpos.h:21: blockIn ==> blocking src/net_processing.h:67: anounce ==> announce src/netaddress.h:486: compatiblity ==> compatibility src/primitives/transaction.h:35: nIn ==> inn, min, bin, nine src/qt/bitcoinunits.cpp:101: nIn ==> inn, min, bin, nine src/rpc/blockchain.cpp:2150: nIn ==> inn, min, bin, nine src/rpc/misc.cpp:198: nIn ==> inn, min, bin, nine src/script/bitcoinconsensus.cpp:81: nIn ==> inn, min, bin, nine src/script/bitcoinconsensus.h:63: nIn ==> inn, min, bin, nine src/script/interpreter.cpp:1279: nIn ==> inn, min, bin, nine src/script/interpreter.h:222: nIn ==> inn, min, bin, nine src/script/sign.cpp:17: nIn ==> inn, min, bin, nine src/script/sign.h:39: nIn ==> inn, min, bin, nine src/serialize.h:181: Unser ==> Under, unset, unsure, user src/signet.cpp:142: nIn ==> inn, min, bin, nine src/test/base32_tests.cpp:17: fo ==> of, for src/test/base64_tests.cpp:17: fo ==> of, for src/test/script_tests.cpp:1509: nIn ==> inn, min, bin, nine src/test/sighash_tests.cpp:27: nIn ==> inn, min, bin, nine src/test/validation_tests.cpp:78: excercise ==> exercise src/undo.h:36: Unser ==> Under, unset, unsure, user src/validation.cpp:1403: nIn ==> inn, min, bin, nine src/validation.h:255: nIn ==> inn, min, bin, nine src/wallet/wallet.cpp:1532: nIn ==> inn, min, bin, nine src/wallet/walletdb.cpp:429: Crypted ==> Encrypted test/functional/feature_nulldummy.py:63: unnecssary ==> unnecessary test/functional/wallet_encryption.py:81: crypted ==> encrypted test/functional/wallet_upgradewallet.py:36: fpr ==> for, far, fps ^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/lint-spelling.ignore-words.txt ``` Running spelling linter on PR branch: ``` $ ./test/lint/lint-spelling.sh src/core_read.cpp:131: presense ==> presence src/net_processing.h:67: anounce ==> announce src/netaddress.h:486: compatiblity ==> compatibility src/test/validation_tests.cpp:78: excercise ==> exercise src/wallet/walletdb.cpp:429: Crypted ==> Encrypted test/functional/feature_nulldummy.py:63: unnecssary ==> unnecessary test/functional/wallet_encryption.py:81: crypted ==> encrypted ^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/lint-spelling.ignore-words.txt ``` This list of remaining findings doesn't contain false positives anymore -- the typos are fixed in PR bitcoin/bitcoin#20762. Happy new year! 🍾 ACKs for top commit: hebasto: re-ACK f3ba916, only suggested changes since my [previous](bitcoin/bitcoin#20817 (review)) review. jonatack: ACK f3ba916 I don't know if there are any particular issues with bumping codespell to v2.0.0, but locally running the spelling linter and the cirrus job at https://cirrus-ci.com/task/5004066998714368 both LGTM. Thanks for also verifying and removing the unused words from the ignore list. Tree-SHA512: e92ae6f16c01d4ff3d54f8c3a0ee95e12741f7bfe031d307a785f5cfd8a80525b16b34275f413b914c4a318f5166f9887399c21f2dad9cc7e9be41647042ef37
2 parents 9a2400b + f3ba916 commit f52f427

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

ci/lint/04_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ${CI_RETRY_EXE} apt-get install -y clang-format-9 python3-pip curl git gawk jq
1111
update-alternatives --install /usr/bin/clang-format clang-format $(which clang-format-9 ) 100
1212
update-alternatives --install /usr/bin/clang-format-diff clang-format-diff $(which clang-format-diff-9) 100
1313

14-
${CI_RETRY_EXE} pip3 install codespell==1.17.1
14+
${CI_RETRY_EXE} pip3 install codespell==2.0.0
1515
${CI_RETRY_EXE} pip3 install flake8==3.8.3
1616
${CI_RETRY_EXE} pip3 install yq
1717
${CI_RETRY_EXE} pip3 install mypy==0.781

test/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ Use the `-v` option for verbose output.
264264
| [`lint-python.sh`](lint/lint-python.sh) | [mypy](https://github.com/python/mypy) | [0.781](https://github.com/bitcoin/bitcoin/pull/19348) | `pip3 install mypy==0.781`
265265
| [`lint-shell.sh`](lint/lint-shell.sh) | [ShellCheck](https://github.com/koalaman/shellcheck) | [0.7.1](https://github.com/bitcoin/bitcoin/pull/19348) | [details...](https://github.com/koalaman/shellcheck#installing)
266266
| [`lint-shell.sh`](lint/lint-shell.sh) | [yq](https://github.com/kislyuk/yq) | default | `pip3 install yq`
267-
| [`lint-spelling.sh`](lint/lint-spelling.sh) | [codespell](https://github.com/codespell-project/codespell) | [1.17.1](https://github.com/bitcoin/bitcoin/pull/19348) | `pip3 install codespell==1.17.1`
267+
| [`lint-spelling.sh`](lint/lint-spelling.sh) | [codespell](https://github.com/codespell-project/codespell) | [2.0.0](https://github.com/bitcoin/bitcoin/pull/20817) | `pip3 install codespell==2.0.0`
268268

269269
Please be aware that on Linux distributions all dependencies are usually available as packages, but could be outdated.
270270

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1+
asend
2+
blockin
3+
cachable
4+
fo
5+
fpr
16
hights
7+
hist
8+
inout
29
mor
3-
mut
4-
objext
10+
nin
11+
ser
12+
unparseable
13+
unser
514
useable
615
wit
7-
unparseable
8-
copyable
9-
cachable
10-
errorstring
11-
keyserver
12-
homogenous
13-
setban
14-
hist
15-
ser
16-
unselect
17-
lowercased

test/lint/lint-spelling.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ if ! command -v codespell > /dev/null; then
1515
fi
1616

1717
IGNORE_WORDS_FILE=test/lint/lint-spelling.ignore-words.txt
18-
if ! codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=${IGNORE_WORDS_FILE} $(git ls-files -- ":(exclude)build-aux/m4/" ":(exclude)contrib/seeds/*.txt" ":(exclude)depends/" ":(exclude)doc/release-notes/" ":(exclude)src/leveldb/" ":(exclude)src/crc32c/" ":(exclude)src/qt/locale/" ":(exclude)src/qt/*.qrc" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/"); then
18+
if ! codespell --check-filenames --disable-colors --quiet-level=7 --ignore-words=${IGNORE_WORDS_FILE} $(git ls-files -- ":(exclude)build-aux/m4/" ":(exclude)contrib/seeds/*.txt" ":(exclude)depends/" ":(exclude)doc/release-notes/" ":(exclude)src/leveldb/" ":(exclude)src/crc32c/" ":(exclude)src/qt/locale/" ":(exclude)src/qt/*.qrc" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/" ":(exclude)contrib/gitian-keys/keys.txt"); then
1919
echo "^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in ${IGNORE_WORDS_FILE}"
2020
fi

0 commit comments

Comments
 (0)