dash/ci/lint/04_install.sh

23 lines
1.0 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
#
# Copyright (c) 2018-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
${CI_RETRY_EXE} apt-get update
${CI_RETRY_EXE} apt-get install -y clang-format-9 python3-pip curl git gawk jq
update-alternatives --install /usr/bin/clang-format clang-format "$(which clang-format-9 )" 100
update-alternatives --install /usr/bin/clang-format-diff clang-format-diff "$(which clang-format-diff-9)" 100
Merge #19331: build: Do not include server symbols in wallet faca73000fa8975c28f6be8be01957c1ae94ea62 ci: Install fixed version of clang-format for linters (MarcoFalke) fa4695da4c69646b58a8fa0b6b30146bb234deb8 build: Sort Makefile.am after renaming file (MarcoFalke) cccc2784a3bb10fa8e43be7e68207cafb12bd915 scripted-diff: Move ui_interface to the node lib (MarcoFalke) fa72ca6a9d90d66012765b0043fd819698b94ba8 qt: Remove unused includes (MarcoFalke) fac96e6450d595fe67168cb7afa7692da6cc9973 wallet: Do not include server symbols (MarcoFalke) fa0f6c58c1c6d10f04c4e65a424cc51ebca50a8c Revert "Fix link error with --enable-debug" (MarcoFalke) Pull request description: This reverts a hacky workaround from commit b83cc0f, which only happens to work due to compiler optimizations. Then, it actually fixes the linker error. The underlying problem is that the wallet includes symbols from the server (ui_interface), which usually results in linker failures. Though, in this specific case the linker failures have not been observed (unless `-O0`) because our compilers were smart enough to strip unused symbols. Fix the underlying problem by creating a new header-only with the needed symbol and move ui_interface to node to clarify that this is part of libbitcoin_server. ACKs for top commit: Sjors: ACK faca730 laanwj: ACK faca73000fa8975c28f6be8be01957c1ae94ea62 hebasto: re-ACK faca73000fa8975c28f6be8be01957c1ae94ea62, since the [previous](https://github.com/bitcoin/bitcoin/pull/19331#pullrequestreview-434420539) review: Tree-SHA512: e9731f249425aaea50b6db5fc7622e10078cf006721bb87989cac190a2ff224412f6f8a7dd83efd018835302337611f5839e29e15bef366047ed591cef58dfb4
2020-07-01 15:18:55 +02:00
Merge #20817: lint: update list of spelling linter false positives, bump to codespell 2.0.0 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
2021-01-04 04:52:08 +01:00
${CI_RETRY_EXE} pip3 install codespell==2.0.0
${CI_RETRY_EXE} pip3 install flake8==3.8.3
${CI_RETRY_EXE} pip3 install mypy==0.910
${CI_RETRY_EXE} pip3 install pyzmq==22.3.0
${CI_RETRY_EXE} pip3 install vulture==2.3
SHELLCHECK_VERSION=v0.8.0
curl -sL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"