From 40c320cad83a942877b13624a8c15711178167cb Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Mon, 25 Apr 2022 22:13:24 +0300 Subject: [PATCH] trivial/lint: tweak `lint-spelling.sh` and fix typos (#4802) * lint: exclude 3-rd party libs from spell-checks * trivial: fix typos --- src/evo/deterministicmns.h | 2 +- src/llmq/utils.cpp | 4 ++-- src/qt/forms/governancelist.ui | 2 +- src/rpc/mining.cpp | 2 +- src/test/descriptor_tests.cpp | 2 +- test/functional/wallet_importmulti.py | 2 +- test/lint/lint-spelling.sh | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/evo/deterministicmns.h b/src/evo/deterministicmns.h index 570698ce69..8281c832e2 100644 --- a/src/evo/deterministicmns.h +++ b/src/evo/deterministicmns.h @@ -210,7 +210,7 @@ public: /** * Execute a callback on all masternodes in the mnList. This will pass a reference - * of each masternode to the callback function. This should be prefered over ForEachMNShared. + * of each masternode to the callback function. This should be preferred over ForEachMNShared. * @param onlyValid Run on all masternodes, or only "valid" (not banned) masternodes * @param cb callback to execute */ diff --git a/src/llmq/utils.cpp b/src/llmq/utils.cpp index 5c0ddef7ca..5bc2820673 100644 --- a/src/llmq/utils.cpp +++ b/src/llmq/utils.cpp @@ -65,9 +65,9 @@ std::vector CLLMQUtils::GetAllQuorumMembers(Consensus::LLM } /* * Quorums created with rotation are now created in a different way. All signingActiveQuorumCount are created during the period of dkgInterval. - * But they are not created exactly in the same block, they are spreaded overtime: one quorum in each block until all signingActiveQuorumCount are created. + * But they are not created exactly in the same block, they are spread overtime: one quorum in each block until all signingActiveQuorumCount are created. * The new concept of quorumIndex is introduced in order to identify them. - * In every dkgInterval blocks (also called CycleQuorumBaseBlock), the spreaded quorum creation starts like this: + * In every dkgInterval blocks (also called CycleQuorumBaseBlock), the spread quorum creation starts like this: * For quorumIndex = 0 : signingActiveQuorumCount * Quorum Q with quorumIndex is created at height CycleQuorumBaseBlock + quorumIndex */ diff --git a/src/qt/forms/governancelist.ui b/src/qt/forms/governancelist.ui index c4be9555be..c9766e0693 100644 --- a/src/qt/forms/governancelist.ui +++ b/src/qt/forms/governancelist.ui @@ -61,7 +61,7 @@ - Filter propsal list + Filter proposal list diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 97c38f9417..5eb9aa2a8d 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -191,7 +191,7 @@ static bool getScriptFromDescriptor(const std::string& descriptor, CScript& scri throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Cannot derive script without private keys")); } - // Combo desriptors can have 2 or 4 scripts, so we can't just check scripts.size() == 1 + // Combo descriptors can have 2 or 4 scripts, so we can't just check scripts.size() == 1 CHECK_NONFATAL(scripts.size() > 0 && scripts.size() <= 4); if (scripts.size() == 1) { diff --git a/src/test/descriptor_tests.cpp b/src/test/descriptor_tests.cpp index deb529cfe3..76cf560d15 100644 --- a/src/test/descriptor_tests.cpp +++ b/src/test/descriptor_tests.cpp @@ -128,7 +128,7 @@ void DoCheck(const std::string& prv, const std::string& pub, int flags, const st // When the descriptor is hardened, evaluate with access to the private keys inside. const FlatSigningProvider& key_provider = (flags & HARDENED) ? keys_priv : keys_pub; - // Evaluate the descriptor selected by `t` in poisition `i`. + // Evaluate the descriptor selected by `t` in position `i`. FlatSigningProvider script_provider, script_provider_cached; std::vector spks, spks_cached; std::vector cache; diff --git a/test/functional/wallet_importmulti.py b/test/functional/wallet_importmulti.py index b325cdf343..28f76a22d3 100755 --- a/test/functional/wallet_importmulti.py +++ b/test/functional/wallet_importmulti.py @@ -640,7 +640,7 @@ class ImportMultiTest(BitcoinTestFramework): assert_equal(addr2, newaddr2) # Import a multisig and make sure the keys don't go into the keypool - self.log.info('Imported scripts with pubkeys shoud not have their pubkeys go into the keypool') + self.log.info('Imported scripts with pubkeys should not have their pubkeys go into the keypool') addr1 = self.nodes[0].getnewaddress() addr2 = self.nodes[0].getnewaddress() pub1 = self.nodes[0].getaddressinfo(addr1)['pubkey'] diff --git a/test/lint/lint-spelling.sh b/test/lint/lint-spelling.sh index 1d87310e10..59ff829c62 100755 --- a/test/lint/lint-spelling.sh +++ b/test/lint/lint-spelling.sh @@ -15,6 +15,6 @@ if ! command -v codespell > /dev/null; then fi IGNORE_WORDS_FILE=test/lint/lint-spelling.ignore-words.txt -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/crypto/" ":(exclude)src/leveldb/" ":(exclude)src/qt/locale/" ":(exclude)src/qt/*.qrc" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/"); then +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/bip39_english.h" ":(exclude)src/crc32c/" ":(exclude)src/crypto/" ":(exclude)src/ctpl_stl.h" ":(exclude)src/cxxtimer.hpp" ":(exclude)src/leveldb/" ":(exclude)src/qt/locale/" ":(exclude)src/qt/*.qrc" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/"); then echo "^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in ${IGNORE_WORDS_FILE}" fi