Skip to content

Conversation

RandyMcMillan
Copy link
Contributor

@RandyMcMillan RandyMcMillan commented Nov 2, 2019

Here is a more thorough lint-spelling update.
This PR takes care of easy to fix spelling errors to clean up the linting stages.
There are misspellings coded into the functional tests.
That is a whole separate job within itself.

@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 2, 2019

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #16519 (guix: Change manifest to use channels and inferiors by dongcarl)

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.

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.

Concept ACK ac6d97f, tested on Linux Mint 19.2:

$ pip3 show codespell | grep Version
Version: 1.16.0

$ ./test/lint/lint-spelling.sh 
src/test/base32_tests.cpp:14: fo  ==> of, for
src/test/base64_tests.cpp:14: fo  ==> of, for
test/lint/lint-locale-dependence.sh:100: stoll  ==> still
^ 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

EDITED: @RandyMcMillan FWIW: Status: Draft means PR is not ready to be reviewed.

EDITED 2: IMHO, the commit message could be more expressive like test: fix all typos ;)

@laanwj
Copy link
Member

laanwj commented Nov 2, 2019

Concept ACK, but from now on, stop opening multiple PRs for everything. If you need to figure out how github works, please experiment with a repository of your own instead of our production repo.

@hebasto
Copy link
Member

hebasto commented Nov 2, 2019

These words could be dropped from ignore list:


mut could be dropped with renaming s/mut/m_mutex/ in threadinterrupt.{h|cpp}.


useable, unparseable, cachable could be dropped with proper fixes in the code base. However, I'm not sure about other devs opinion ;)


homogenous could be dropped with a proper fix in tinyformat.h. Also please see #12716 (comment).

@@ -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/leveldb/" ":(exclude)src/qt/locale/" ":(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/leveldb/" ":(exclude)src/qt/locale/" ":(exclude)src/qt/bitcoin_locale.qrc" ":(exclude)src/secp256k1/" ":(exclude)src/univalue/"); then
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Could replace ":(exclude)src/qt/bitcoin_locale.qrc" with ":(exclude)*.qrc"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @practicalswift - awesome suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Included this suggestion in the commit. thanks again.

@practicalswift
Copy link
Contributor

ACK ac6d97f modulo addressing of the feedback from @hebasto :)

@hebasto
Copy link
Member

hebasto commented Nov 2, 2019

Here are some recent similar PRs:

Maybe it is better to make such a PR once only per major and/or minor release (as part of release process)?

@maflcko maflcko changed the title build:lint eliminate some lint spelling alerts doc: Fix some misspellings Nov 2, 2019
@RandyMcMillan
Copy link
Contributor Author

RandyMcMillan commented Nov 3, 2019

@laanwj - I apologize for the PR noise. For some reason I can't reopen PRs. It is probably something I did. (forced push setting in your admin settings) - I have since figured out my workflow. So if it is an admin setting on your side - I apologize and have since implemented my own build environment and will only create PRs once I have tested my changes personally FIRST! Again sincere apology. ditto to @MarcoFalke and the rest of the members - @hebasto @practicalswift @dongcarl @promag etc...

@RandyMcMillan
Copy link
Contributor Author

RandyMcMillan commented Nov 3, 2019

These words could be dropped from ignore list:

mut could be dropped with renaming s/mut/m_mutex/ in threadinterrupt.{h|cpp}.

@hebasto,

I left the words you were unsure about out until we have more feed back.

I also removed /bitcoin/contrib/guix/manifest.scm from the commit.

If @dongcarl's change gets merged he will have killed two birds.
REF: d4e0694

useable, unparseable, cachable could be dropped with proper fixes in the code base. However, I'm not sure about other devs opinion ;)

homogenous could be dropped with a proper fix in tinyformat.h. Also please see #12716 (comment).

@practicalswift
Copy link
Contributor

ACK d17d888

@hebasto
Copy link
Member

hebasto commented Nov 3, 2019

Tested d17d888:

$ ./test/lint/lint-spelling.sh | grep mut
src/threadinterrupt.cpp:25: mut  ==> must, mutt, moot
src/threadinterrupt.cpp:33: mut  ==> must, mutt, moot
src/threadinterrupt.h:32: mut  ==> must, mutt, moot

@RandyMcMillan Did you forget to rename mut to m_mutex as suggested?


I also removed /bitcoin/contrib/guix/manifest.scm from the commit.

Why? The goal of the mentioned commit is orthogonal to the goal of this PR.
I'd also prefer a complete solution over partial one, if it is feasible.


There is a misspelling in the commit message "doc:Fix some mispellings" ;)

@RandyMcMillan
Copy link
Contributor Author

$ ./test/lint/lint-spelling.sh | grep mut

@hebasto - speaking of grep - we need to add an alias to ggrep in the Mac environment. Brew doesnt do it automatically - this will take care on a linting issue in the Mac build.

@promag
Copy link
Contributor

promag commented Nov 3, 2019

Concept ACK, no longer draft?

CI failing with, for instance:

Running test/util/bitcoin-util-test.py...
/usr/bin/python3.6 ../test/util/bitcoin-util-test.py
2019-11-03 20:06:22,888 - ERROR - Error mismatch:
Expected: error: Uncompressed pubkeys are not usable for SegWit outputs
Received: error: Uncompressed pubkeys are not useable for SegWit outputs

@RandyMcMillan
Copy link
Contributor Author

RandyMcMillan commented Nov 4, 2019

NOTE: There are misspellings built into the functional tests.

That is a whole job with in itself. I had to pull some changes out.

Sorry about the extra builds.

I guess that is why people don't try to fix the linting.

Preliminary test build:
https://travis-ci.org/RandyMcMillan/bitcoin/builds/606965245

@hebasto @promag Yes, I believe it is ready.

I appreciate your patience and feedback.

@RandyMcMillan RandyMcMillan marked this pull request as ready for review November 4, 2019 00:27
@hebasto
Copy link
Member

hebasto commented Nov 4, 2019

@RandyMcMillan Please do not touch files in doc/man/ as they are generated by a script, and historical release notes in doc/release-notes/.

Copy link
Contributor

@practicalswift practicalswift left a comment

Choose a reason for hiding this comment

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

ACK ac83133 -- diff looks correct

@RandyMcMillan
Copy link
Contributor Author

RandyMcMillan commented Nov 4, 2019

@hebasto - done. But can I make the point - by NOT fixing "historical" spelling issues in the release notes - we are also choosing to allow them and NEW ERRORS to persist into the future? What is the value of letting them persist? If we fix the old issues NOW we can enforce better policy and linting moving forward? Couldn't we even implement a build step that focuses solely on these types of issues or remove any rules that ignore documentation? (that was the thought behind editing the release notes to begin with)

Thanks! 👍

maflcko pushed a commit that referenced this pull request Nov 4, 2019
ac83133 doc: Fix some misspellings (randymcmillan)

Pull request description:

  Here is a more thorough lint-spelling update.
  This PR takes care of easy to fix spelling errors to clean up the linting stages.
  There are misspellings coded into the functional tests.
  That is a whole separate job within itself.

ACKs for top commit:
  practicalswift:
    ACK ac83133 -- diff looks correct

Tree-SHA512: d8fad83fed083715655f148263ddeffc6752c8007d568fcf3dc2c418ccd5db70089ce3ccfd3994fcbd78043171402eb9cca5bdd5125287e22c42ea305aaa6e9d
@maflcko maflcko merged commit ac83133 into bitcoin:master Nov 4, 2019
@laanwj
Copy link
Member

laanwj commented Nov 4, 2019

But can I make the point - by NOT fixing "historical" spelling issues in the release notes - we are also choosing to allow them and NEW ERRORS to persist into the future?

They are historical documents, which have been published to many places besides this repository. Fixing errors there would be like going to a museum and scribbling in a 12th century bible, for example 😄 It's no reason to allow new errors in new files, just, what has been done has been done.

MarkLTZ added a commit to litecoinz-core/litecoinz that referenced this pull request Apr 7, 2020
- doc: fix git add argument bitcoin#18513
- build: Fix libevent linking for bench_bitcoin binary bitcoin#18397
- script: fix SCRIPT_ERR_SIG_PUSHONLY error string bitcoin#18412
- doc: Comment fix merkle.cpp bitcoin#18379
- log: Fix UB with bench on genesis block bitcoin#15283
- test: Fix mining to an invalid target + ensure that a new block has the correct hash internally bitcoin#18350
- Fix missing header in sync.h bitcoin#18357
- refactor: Fix implicit value conversion in formatPingTime bitcoin#18260
- Fix .gitignore policy in build_msvc directory bitcoin#18108
- build: Fix behavior when ALLOW_HOST_PACKAGES unset bitcoin#18051
- test: Fix p2p_invalid_messages failing in Python 3.8 because of warning bitcoin#17931
- qa: Fix double-negative arg test bitcoin#17893
- build: Fix configure report about qr bitcoin#17547
- log: Fix log message for -par=1 bitcoin#17325
- bench: Fix negative values and zero for -evals flag bitcoin#17267
- depends: fix boost mac cross build with clang 9+ bitcoin#17231
- doc: Fix broken bitcoin-cli examples bitcoin#17119
- doc: fix Makefile target in benchmarking.md bitcoin#17081
- contrib: fix minor typos in makeseeds.py bitcoin#17042
- test: Fix Python Docstring to include all Args. bitcoin#17030
- doc: Fix some misspellings bitcoin#17351
- doc: Doxygen-friendly script/descriptor.h comments bitcoin#16947
- doc: Fix doxygen errors bitcoin#17945
- doc: Doxygen-friendly CuckooCache comments bitcoin#16986
- doc: Add to Doxygen documentation guidelines bitcoin#17873
MarkLTZ added a commit to litecoinz-core/litecoinz that referenced this pull request Apr 7, 2020
- doc: fix git add argument bitcoin#18513
- build: Fix libevent linking for bench_bitcoin binary bitcoin#18397
- script: fix SCRIPT_ERR_SIG_PUSHONLY error string bitcoin#18412
- doc: Comment fix merkle.cpp bitcoin#18379
- log: Fix UB with bench on genesis block bitcoin#15283
- test: Fix mining to an invalid target + ensure that a new block has the correct hash internally bitcoin#18350
- Fix missing header in sync.h bitcoin#18357
- refactor: Fix implicit value conversion in formatPingTime bitcoin#18260
- Fix .gitignore policy in build_msvc directory bitcoin#18108
- build: Fix behavior when ALLOW_HOST_PACKAGES unset bitcoin#18051
- test: Fix p2p_invalid_messages failing in Python 3.8 because of warning bitcoin#17931
- qa: Fix double-negative arg test bitcoin#17893
- build: Fix configure report about qr bitcoin#17547
- log: Fix log message for -par=1 bitcoin#17325
- bench: Fix negative values and zero for -evals flag bitcoin#17267
- depends: fix boost mac cross build with clang 9+ bitcoin#17231
- doc: Fix broken bitcoin-cli examples bitcoin#17119
- doc: fix Makefile target in benchmarking.md bitcoin#17081
- contrib: fix minor typos in makeseeds.py bitcoin#17042
- test: Fix Python Docstring to include all Args. bitcoin#17030
- doc: Fix some misspellings bitcoin#17351
- doc: Doxygen-friendly script/descriptor.h comments bitcoin#16947
- doc: Fix doxygen errors bitcoin#17945
- doc: Doxygen-friendly CuckooCache comments bitcoin#16986
- doc: Add to Doxygen documentation guidelines bitcoin#17873
- depends: Consistent use of package variable bitcoin#17928
- init: Replace URL_WEBSITE with PACKAGE_URL bitcoin#18503
- doc: Add missed copyright headers bitcoin#17691
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 30, 2020
Summary:
Comments-only changes

This is a backport of Core [[bitcoin/bitcoin#17351 | PR17351]]

Test Plan: `ninja`

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8199
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants