Skip to content

Commit 71ac70d

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#26095: script: bump codespell to 2.2.1, update ignored words and fix spelling
b6a6556 Fix issues identified by codespell 2.2.1 and update ignored words (Jon Atack) 8f2010d Bump codespell version to 2.2.1 (Jon Atack) Pull request description: as well as one in `test/lint/lint-locale-dependence.py` not seen by the spelling linter. Can be tested locally by running `test/lint/lint-spelling.py` on this branch versus on master and by checking the CI linter result. ACKs for top commit: satsie: ACK b6a6556 Tree-SHA512: ab4ba029a9a5de5926fa5d336bd3b21245acf0649c6aa69a48c223bd22327e13beb32e970f66f54db58cd318731b643e1c7ace9a89776ed2a069cddc02363b71
2 parents d76a423 + b6a6556 commit 71ac70d

File tree

10 files changed

+17
-15
lines changed

10 files changed

+17
-15
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==2.1.0
14+
${CI_RETRY_EXE} pip3 install codespell==2.2.1
1515
${CI_RETRY_EXE} pip3 install flake8==4.0.1
1616
${CI_RETRY_EXE} pip3 install mypy==0.942
1717
${CI_RETRY_EXE} pip3 install pyzmq==22.3.0

src/bench/nanobench.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ class Bench {
858858
* @brief Retrieves all benchmark results collected by the bench object so far.
859859
*
860860
* Each call to run() generates a Result that is stored within the Bench instance. This is mostly for advanced users who want to
861-
* see all the nitty gritty detials.
861+
* see all the nitty gritty details.
862862
*
863863
* @return All results collected so far.
864864
*/

src/bitcoind.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static bool AppInit(NodeContext& node, int argc, char* argv[])
216216
if (token) { // Success
217217
exit(EXIT_SUCCESS);
218218
} else { // fRet = false or token read error (premature exit).
219-
tfm::format(std::cerr, "Error during initializaton - check debug.log for details\n");
219+
tfm::format(std::cerr, "Error during initialization - check debug.log for details\n");
220220
exit(EXIT_FAILURE);
221221
}
222222
}

src/test/validation_chainstatemanager_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ BOOST_FIXTURE_TEST_CASE(chainstatemanager_activate_snapshot, TestChain100Setup)
314314

315315
//! Test LoadBlockIndex behavior when multiple chainstates are in use.
316316
//!
317-
//! - First, verfiy that setBlockIndexCandidates is as expected when using a single,
317+
//! - First, verify that setBlockIndexCandidates is as expected when using a single,
318318
//! fully-validating chainstate.
319319
//!
320320
//! - Then mark a region of the chain BLOCK_ASSUMED_VALID and introduce a second chainstate

src/wallet/rpc/spend.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ RPCHelpMan sendmany()
338338
{"estimate_mode", RPCArg::Type::STR, RPCArg::Default{"unset"}, "The fee estimate mode, must be one of (case insensitive):\n"
339339
"\"" + FeeModes("\"\n\"") + "\""},
340340
{"fee_rate", RPCArg::Type::AMOUNT, RPCArg::DefaultHint{"not set, fall back to wallet fee estimation"}, "Specify a fee rate in " + CURRENCY_ATOM + "/vB."},
341-
{"verbose", RPCArg::Type::BOOL, RPCArg::Default{false}, "If true, return extra infomration about the transaction."},
341+
{"verbose", RPCArg::Type::BOOL, RPCArg::Default{false}, "If true, return extra information about the transaction."},
342342
},
343343
{
344344
RPCResult{"if verbose is not set or set to false",

src/wallet/test/fuzz/coinselection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static void GroupCoins(FuzzedDataProvider& fuzzed_data_provider, const std::vect
3030
bool valid_outputgroup{false};
3131
for (auto& coin : coins) {
3232
output_group.Insert(coin, /*ancestors=*/0, /*descendants=*/0, positive_only);
33-
// If positive_only was specified, nothing may have been inserted, leading to an empty outpout group
33+
// If positive_only was specified, nothing may have been inserted, leading to an empty output group
3434
// that would be invalid for the BnB algorithm
3535
valid_outputgroup = !positive_only || output_group.GetSelectionAmount() > 0;
3636
if (valid_outputgroup && fuzzed_data_provider.ConsumeBool()) {

test/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ gdb /home/example/bitcoind <pid>
272272
Note: gdb attach step may require ptrace_scope to be modified, or `sudo` preceding the `gdb`.
273273
See this link for considerations: https://www.kernel.org/doc/Documentation/security/Yama.txt
274274

275-
Often while debugging rpc calls from functional tests, the test might reach timeout before
276-
process can return a response. Use `--timeout-factor 0` to disable all rpc timeouts for that partcular
275+
Often while debugging RPC calls in functional tests, the test might time out before the
276+
process can return a response. Use `--timeout-factor 0` to disable all RPC timeouts for that particular
277277
functional test. Ex: `test/functional/wallet_hd.py --timeout-factor 0`.
278278

279279
##### Profiling

test/functional/feature_taproot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,13 +1007,13 @@ def big_spend_inputs(ctx):
10071007
# input a valid signature with the passed pk followed by a dummy push of bytes that are to be dropped, and
10081008
# will execute sigops signature checks.
10091009
SIGOPS_RATIO_SCRIPTS = [
1010-
# n OP_CHECKSIGVERFIYs and 1 OP_CHECKSIG.
1010+
# n OP_CHECKSIGVERIFYs and 1 OP_CHECKSIG.
10111011
lambda n, pk: (CScript([OP_DROP, pk] + [OP_2DUP, OP_CHECKSIGVERIFY] * n + [OP_CHECKSIG]), n + 1),
10121012
# n OP_CHECKSIGVERIFYs and 1 OP_CHECKSIGADD, but also one unexecuted OP_CHECKSIGVERIFY.
10131013
lambda n, pk: (CScript([OP_DROP, pk, OP_0, OP_IF, OP_2DUP, OP_CHECKSIGVERIFY, OP_ENDIF] + [OP_2DUP, OP_CHECKSIGVERIFY] * n + [OP_2, OP_SWAP, OP_CHECKSIGADD, OP_3, OP_EQUAL]), n + 1),
10141014
# n OP_CHECKSIGVERIFYs and 1 OP_CHECKSIGADD, but also one unexecuted OP_CHECKSIG.
10151015
lambda n, pk: (CScript([random_bytes(220), OP_2DROP, pk, OP_1, OP_NOTIF, OP_2DUP, OP_CHECKSIG, OP_VERIFY, OP_ENDIF] + [OP_2DUP, OP_CHECKSIGVERIFY] * n + [OP_4, OP_SWAP, OP_CHECKSIGADD, OP_5, OP_EQUAL]), n + 1),
1016-
# n OP_CHECKSIGVERFIYs and 1 OP_CHECKSIGADD, but also one unexecuted OP_CHECKSIGADD.
1016+
# n OP_CHECKSIGVERIFYs and 1 OP_CHECKSIGADD, but also one unexecuted OP_CHECKSIGADD.
10171017
lambda n, pk: (CScript([OP_DROP, pk, OP_1, OP_IF, OP_ELSE, OP_2DUP, OP_6, OP_SWAP, OP_CHECKSIGADD, OP_7, OP_EQUALVERIFY, OP_ENDIF] + [OP_2DUP, OP_CHECKSIGVERIFY] * n + [OP_8, OP_SWAP, OP_CHECKSIGADD, OP_9, OP_EQUAL]), n + 1),
10181018
# n+1 OP_CHECKSIGs, but also one OP_CHECKSIG with an empty signature.
10191019
lambda n, pk: (CScript([OP_DROP, OP_0, pk, OP_CHECKSIG, OP_NOT, OP_VERIFY, pk] + [OP_2DUP, OP_CHECKSIG, OP_VERIFY] * n + [OP_CHECKSIG]), n + 1),

test/lint/lint-locale-dependence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def main():
250250
exit_code = 1
251251

252252
if exit_code == 1:
253-
print("Unnecessary locale depedence can cause bugs that are very tricky to isolate and fix. Please avoid using locale dependent functions if possible.\n")
253+
print("Unnecessary locale dependence can cause bugs that are very tricky to isolate and fix. Please avoid using locale-dependent functions if possible.\n")
254254
print(f"Advice not applicable in this specific case? Add an exception by updating the ignore list in {sys.argv[0]}")
255255

256256
sys.exit(exit_code)

test/lint/spelling.ignore-words.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
asend
22
ba
33
blockin
4+
bu
45
cachable
5-
creat
6-
desig
6+
clen
77
fo
88
fpr
99
hights
10-
hist
11-
inout
10+
inflight
1211
invokable
1312
keypair
1413
mor
1514
nd
1615
nin
1716
ser
17+
siz
18+
stap
1819
unparseable
1920
unser
2021
useable
22+
warmup
2123
wit

0 commit comments

Comments
 (0)