ae74ad09fb
f3ba916e8b5b5ee2a381cef38882671eadb231df lint: ignore gitian keys file for spelling linter (Sebastian Falbesoner) da289a6c4a0a5e110e301f34f1db57b6d31bcdcc lint: update list of spelling linter false positives (Sebastian Falbesoner) a0022f1cfbb3d8f1f8f3ff135f854be0cb89643f 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](https://github.com/bitcoin/bitcoin/pull/20762#issuecomment-750889701)~~, 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](https://github.com/bitcoin/bitcoin/pull/20817#discussion_r550763409). 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 https://github.com/bitcoin/bitcoin/pull/20817#issuecomment-753428669. 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 https://github.com/bitcoin/bitcoin/pull/20762. Happy new year! 🍾 ACKs for top commit: hebasto: re-ACK f3ba916e8b5b5ee2a381cef38882671eadb231df, only suggested changes since my [previous](https://github.com/bitcoin/bitcoin/pull/20817#pullrequestreview-560632881) review. jonatack: ACK f3ba916e8b5b5ee2a381cef38882671eadb231df 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 |
||
---|---|---|
.. | ||
dash | ||
lint | ||
retry | ||
test | ||
lint_run_all.sh | ||
README.md | ||
test_run_all.sh |
CI Scripts
This directory contains scripts for each build step in each build stage.
Running a Stage Locally
Be aware that the tests will be built and run in-place, so please run at your own risk. If the repository is not a fresh git clone, you might have to clean files from previous builds or test runs first.
The ci needs to perform various sysadmin tasks such as installing packages or writing to the user's home directory. While most of the actions are done inside a docker container, this is not possible for all. Thus, cache directories, such as the depends cache, previous release binaries, or ccache, are mounted as read-write into the docker container. While it should be fine to run the ci system locally on you development box, the ci scripts can generally be assumed to have received less review and testing compared to other parts of the codebase. If you want to keep the work tree clean, you might want to run the ci system in a virtual machine with a Linux operating system of your choice.
To allow for a wide range of tested environments, but also ensure reproducibility to some extent, the test stage
requires docker
to be installed. To install all requirements on Ubuntu, run
sudo apt install docker.io bash
To run the default test stage,
./ci/test_run_all.sh
To run the test stage with a specific configuration,
FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh
Configurations
The test files (FILE_ENV
) are constructed to test a wide range of
configurations, rather than a single pass/fail. This helps to catch build
failures and logic errors that present on platforms other than the ones the
author has tested.
Some builders use the dependency-generator in ./depends
, rather than using
the system package manager to install build dependencies. This guarantees that
the tester is using the same versions as the release builds, which also use
./depends
.
If no FILE_ENV
has been specified or values are left out, 00_setup_env.sh
is used as the default configuration with fallback values.
It is also possible to force a specific configuration without modifying the file. For example,
MAKEJOBS="-j1" FILE_ENV="./ci/test/00_setup_env_arm.sh" ./ci/test_run_all.sh
The files starting with 0n
(n
greater than 0) are the scripts that are run
in order.
Cache
In order to avoid rebuilding all dependencies for each build, the binaries are cached and re-used when possible. Changes in the dependency-generator will trigger cache-invalidation and rebuilds as necessary.