Occuring -> occurring (random.h)
Covert -> convert (chacha_poly_aead.cpp)
Fix nWe false positive in blockchain.cpp (https://github.com/bitcoin/bitcoin/pull/24203#issuecomment-1025116962)
Got it by linter, other ones are false positives.
Occuring -> occurring (random.h)
Covert -> convert (chacha_poly_aead.cpp)
Fix nWe false positive in blockchain.cpp (https://github.com/bitcoin/bitcoin/pull/24203#issuecomment-1025116962)
Got it by linter, other ones are false positives.
88 | @@ -89,7 +89,7 @@ constexpr auto GetRandMillis = GetRandomDuration<std::chrono::milliseconds>; 89 | * is memoryless and should be used for repeated network events (e.g. sending a 90 | * certain type of message) to minimize leaking information to observers. 91 | * 92 | - * The probability of an event occuring before time x is 1 - e^-(x/a) where a 93 | + * The probability of an event occurring before time x is 1 - e^-(x/a) where a
Why only fix this one? The linter shows a few more. (Some are false positives and should be handled differently).
bitcoin (master)₿ test/lint//lint-spelling.sh
src/crypto/chacha_poly_aead.cpp:76: covert ==> convert
src/random.h:92: occuring ==> occurring
src/rpc/blockchain.cpp:794: nWe ==> new
src/util/syscall_sandbox.cpp:128: creat ==> create
test/functional/data/rpc_decodescript.json:81: ba ==> by, be
test/functional/data/rpc_decodescript.json:84: ba ==> by, be
^ 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
Most of that are false positives. Let me check.
covert => convert is legit. Just checked it, will push here.
Yes. When a pull fixes the spelling linter results, it usually ensures the result is clean in one commit and doesn't leave false positives.
Make sense, great. Just updated it, thanks!
You didn't push fyi if you intended to
I did it. Only covert and occuring are errors, other ones are false positives.
Why not fix the false positives so the linter output is clean?
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
utACK 9255261aba5663065abda29867078f0faa288cd7
Concept ACK
I agree with @jonatack suggestion. This PR's scope should be broadened to correct all the lint spelling check instances, either by fixing the typo or marking the instances as false positive.
After the recent update of the PR. There are still three instances in the lint-spelling.sh test that needs to be addressed:

I would also suggest renaming the PR heading to better to infer the new general goal of this PR.
- nWe
- creat
- ba
These are all three false positives. Suggestion for fixing the nWe one:
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -790,10 +790,10 @@ static RPCHelpMan getblockfrompeer()
{
return RPCHelpMan{
"getblockfrompeer",
- "Attempt to fetch block from a given peer.\n"
- "\nWe must have the header for this block, e.g. using submitheader.\n"
- "Subsequent calls for the same block and a new peer will cause the response from the previous peer to be ignored.\n"
- "\nReturns an empty JSON object if the request was successfully scheduled.",
+ "Attempt to fetch block from a given peer.\n\n"
+ "We must have the header for this block, e.g. using submitheader.\n"
+ "Subsequent calls for the same block and a new peer will cause the response from the previous peer to be ignored.\n\n"
+ "Returns an empty JSON object if the request was successfully scheduled.",
{
{"block_hash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
{"peer_id", RPCArg::Type::NUM, RPCArg::Optional::NO, "The peer to fetch it from (see getpeerinfo for peer IDs)"},
789 | @@ -790,8 +790,8 @@ static RPCHelpMan getblockfrompeer() 790 | { 791 | return RPCHelpMan{ 792 | "getblockfrompeer", 793 | - "Attempt to fetch block from a given peer.\n" 794 | - "\nWe must have the header for this block, e.g. using submitheader.\n" 795 | + "Attempt to fetch block from a given peer.\n\n" 796 | + "We must have the header for this block, e.g. using submitheader.\n"
Can we fix the nReturns below just for consistency?
Yes, agreed.
ACK bad0e7f
test/lint/lint-spelling.sh still returns:
src/util/syscall_sandbox.cpp:128: creat ==> create
test/functional/data/rpc_decodescript.json:81: ba ==> by, be
test/functional/data/rpc_decodescript.json:84: ba ==> by, be
Suggestion
--- a/test/lint/lint-spelling.ignore-words.txt
+++ b/test/lint/lint-spelling.ignore-words.txt
@@ -1,6 +1,9 @@
asend
+ba
blockin
cachable
+creat
fo
fpr
hights
(creat is a valid linux syscall)
Concept ACK
ACK 58ccc885413d66b4fa581574360febfa27eb545f
tested that ./test/lint/lint-spelling.sh returns no errors
utACK, it's good to fix this. The changes make sense, I did not validate that the linter output is clean now.