Skip to content

Conversation

Sjors
Copy link
Member

@Sjors Sjors commented Oct 6, 2023

This PR fixes typos found by lint-spelling.py using codespell 2.2.6.

Our CI linter job uses codespell 2.2.5 and found fewer typos that I did locally. In any case it's happy now.

@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 6, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK pablomartin4btc
Concept NACK fanquake, maflcko
Stale ACK hebasto, jarolrod, hernanmarino, achow101, josibake

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #28710 (Remove the legacy wallet and BDB dependency by achow101)
  • #27788 (rpc: Be able to access RPC parameters by name by achow101)
  • #25273 (wallet: Pass through transaction locktime and preset input sequences and scripts to CreateTransaction by achow101)

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.

@@ -6,6 +6,7 @@ bu
cachable
clen
crypted
debbugs
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a reference to a Github repo in the Guix install doc.

@Sjors
Copy link
Member Author

Sjors commented Oct 6, 2023

Updated to also fix re-use -> reuse (except in historical release notes, which the linter skips).

@Sjors
Copy link
Member Author

Sjors commented Oct 6, 2023

Dropped typo fix in sketch_impl.h and added a warning to the release process to not (accidentally) touch typos in upstream code.

@hernanmarino
Copy link
Contributor

This is a nice idea. I always have a conflict between submitting this simple typo-fixing PRs and ignoring them. This should be done often, for evey release .

We probably don't want too many pull requests that just fix a typo. At the same time, if we never fix them people will start ignore the linter all-together. So my suggestion would be to do this before branch-off.

@hebasto
Copy link
Member

hebasto commented Oct 7, 2023

Our CI linter job uses codespell 2.2.5 and found fewer typos that I did locally. In any case it's happy now.

Why not bumping the codespell version in CI simultaneously?

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reckon that changes in such a pull request should be forced by a linter. However, with the picked change into the spelling.ignore-words.txt file, the linter output is as follows:

$ ./test/lint/lint-spelling.py 
src/addrman.h:175: occurence ==> occurrence
src/net_processing.cpp:2450: annnounced ==> announced
src/net_processing.cpp:3595: succesful ==> successful
src/policy/policy.h:101: compatability ==> compatibility
src/qt/transactiontablemodel.cpp:222: re-use ==> reuse
src/rpc/server.cpp:412: unspecifed ==> unspecified
src/rpc/util.cpp:1091: re-use ==> reuse
src/rpc/util.h:409: documention ==> documentation
src/test/fuzz/FuzzedDataProvider.h:161: capaticity ==> capacity
src/test/orphanage_tests.cpp:114: Re-use ==> Reuse
src/test/script_tests.cpp:1115: re-use ==> reuse
src/torcontrol.cpp:254: implementors ==> implementers
src/txmempool.h:480: appplies ==> applies
src/wallet/feebumper.cpp:173: re-use ==> reuse
src/wallet/spend.cpp:1260: re-use ==> reuse
src/wallet/spend.cpp:1302: Re-use ==> Reuse
test/functional/test_framework/blockfilter.py:32: relvant ==> relevant
test/functional/wallet_avoidreuse.py:260: re-use ==> reuse
^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/spelling.ignore-words.txt

Apparently, the linter ignores the word "re-used" in the following files:

  • ci/README.md
  • depends/description.md
  • src/test/versionbits_tests.cpp
  • src/wallet/wallet.h

The overall changes look consistent though.

ACK 650e22d.

@Sjors
Copy link
Member Author

Sjors commented Oct 8, 2023

Why not bumping the codespell version in CI simultaneously?

I'll look into that if I have to retouch. At least we know that such a bump won't reveal new typos, so it can be done safely anytime.

Copy link
Member

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 650e22d

@DrahtBot DrahtBot requested review from hebasto and removed request for hebasto October 12, 2023 04:24
Copy link
Contributor

@hernanmarino hernanmarino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 650e22d

Copy link
Member

@pablomartin4btc pablomartin4btc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 650e22d

* For future-proofing, controller implementors MAY use the following
* For future-proofing, controller implementers MAY use the following
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, both implementors & implementers are valid words, but it seems they have different meaning (Implementer: One who has implemented, Implementor: One who provides implementation).

@achow101
Copy link
Member

ACK 650e22d

@fanquake
Copy link
Member

NACK on adding this to the release process. I don't understand why the CI infra isn't being changed here. This is the wrong solution to a non-problem.

@fanquake
Copy link
Member

To clarify:

  • If the lint infra doesn't work (is ignored by everyone, and doesn't enforce the linting via failure) then it should be just removed. Otherwise, why do we have it? It basically just results in random PRs to "fix"/bump things.
  • If we are going to keep the infra, and change anything here, why wouldn't it be updated to the newest version available, and all issues fixed?
  • Adding anything like this to the release process is just reinforcement of the lint infra being pointless:
    • You are just delegating to someone (probably a maintainer) to run codespell pre branch off.
    • Trivial things should not be added to an (already messy) doc that contains important steps for creating a release.

so it can be done safely anytime.

We aren't changing consensus code here, why would it be unsafe to fix typos at any time?

@josibake
Copy link
Member

Also a NACK on adding this to the release process. We should be looking for ways to reduce manual steps and further automate the release process. The last commit adds a manual step and doesn't address the root cause of how these spelling errors are getting merged in the first place.

I'd suggest we drop 650e22d and instead, look into updating the linting infrastructure so that these errors are caught going forward. If after fixing the linting infrastructure we still need manual fix up PRs, they should happen whenever someone is sufficiently motivated to do it, and not be tied to a release process. Ideally, any future fix-up PRs should also include updates to the linting infrastructure to prevent the same type of errors from sneaking through.

@josibake
Copy link
Member

ACK e062212

@maflcko
Copy link
Member

maflcko commented Nov 6, 2023

Are you still working on this? Otherwise, I think it can be closed, so that it can be picked up by someone else, if it is still relevant.

@Sjors
Copy link
Member Author

Sjors commented Nov 6, 2023

I was still waiting for feedback from maintainers, but I'll just drop the last commit.

@Sjors Sjors changed the title Fix typos and suggest doing so before branch-off Fix typos Nov 6, 2023
@DrahtBot DrahtBot requested review from hebasto, hernanmarino, pablomartin4btc, achow101 and jarolrod and removed request for josibake November 6, 2023 09:44
@fanquake
Copy link
Member

fanquake commented Nov 6, 2023

test/functional/feature_assumeutxo.py:78: refering ==> referring
test/functional/feature_assumeutxo.py:115: refering ==> referring
^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/spelling.ignore-words.txt

@DrahtBot DrahtBot requested review from hernanmarino and removed request for hernanmarino November 6, 2023 09:56
@maflcko
Copy link
Member

maflcko commented Nov 6, 2023

I was still waiting for feedback from maintainers

DrahtBot has a summary comment, which has links to all feedback, including that of maintainers, see #28605 (comment)

@DrahtBot DrahtBot requested review from hernanmarino and removed request for hernanmarino November 6, 2023 10:17
As found by lint-spelling.py using codespell 2.2.6.
@Sjors
Copy link
Member Author

Sjors commented Nov 7, 2023

Rebased to fix those two new typos.

Copy link
Member

@pablomartin4btc pablomartin4btc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re ACK 43de4d3

@DrahtBot DrahtBot requested review from josibake and hernanmarino and removed request for hernanmarino November 7, 2023 01:46
@fanquake
Copy link
Member

There are even more since this was last updated, but going to merge this now, and we can follow up again later.

@DrahtBot DrahtBot requested review from hernanmarino and removed request for hernanmarino November 16, 2023 10:35
@fanquake fanquake merged commit 22025d0 into bitcoin:master Nov 16, 2023
@Sjors Sjors deleted the 2023/10/typos branch November 17, 2023 13:29
@bitcoin bitcoin locked and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants