Skip to content

lint: Make lint spellcheck a failure instead of warning - #25706

Closed
aureleoules wants to merge 1 commit into
bitcoin:masterfrom
aureleoules:2022-07-lint-spellcheck-failure
Closed

aureleoules wants to merge 1 commit into
bitcoin:masterfrom
aureleoules:2022-07-lint-spellcheck-failure

Conversation

@aureleoules

Copy link
Copy Markdown
Contributor

This change makes the spellcheck test a failure instead of warning when it fails.
See #25701 (comment).

I have also refactored the test to address MarcoFalke's comments #24766 (review).

@aureleoules
aureleoules force-pushed the 2022-07-lint-spellcheck-failure branch from f3b5ec8 to fefbca3 Compare July 26, 2022 10:20

@shaavan shaavan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK fefbca3

  • I agree with the concept of making spellcheck be an error instead of a warning.
  • Though, at first, I thought it was too strict for a spelling mistake to be deemed an error, I understand that this will save a lot of maintenance burden and remove the need for PRs to fix spellings.
  • I verified the code and confirmed all the suggestions from @MarcoFalke's this comment have been tackled here.
  • I was able to verify the success working of this PR by using the following patch
 #include <util/time.h>
-
+// this is a test coment
 #include <deque>
 #include <functional>

and getting the following error:

src/torcontrol.cpp:21: coment ==> comment
^ Error: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/spelling.ignore-words.txt

@jarolrod

Copy link
Copy Markdown
Contributor

concept ack

@jarolrod jarolrod left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thought about this a little more, I'm concept 0 on this.

Incorrect spelling of words in an inconsequential change shouldn't lead to the CI being red.

What if your first language is not English, and you just care about writing good code? You publish a change, and CI keeps failing because of these darn English words; no one is leaving a review to fix your spelling or grammar. So your PR sits, where otherwise it might have been merged. This can be discouraging for new developers; especially of different backgrounds/native languages.

Now, in consideration of a really important change, and the comments written along with it, {insert criteria of important change here}, this would be more appropriate. But, we can't selectively turn this on or off.

If we enable this, there should be a commitment to at least address the first scenario, if it ever is to come up. But, I'd rather avoid polluting PR's with grammar nazism.

Concept ACK on the changes outside of making this a failure :)

@aureleoules

Copy link
Copy Markdown
Contributor Author

@jarolrod I understand your point but isn't it a bit extreme?
Also, wouldn't you already need to have a decent english level to start contributing to Bitcoin as most of the implementation documentation / code is written in english?

But, I'd rather avoid polluting PR's with grammar nazism.

I understand but this change would also avoid pull requests that fix these mistakes.

It would be great to have a yellow/warning status for GitHub checks but unfortunately GitHub doesn't provide this feature.
I'm happy to drop the exit(1) if others feel the same.

@DrahtBot

DrahtBot commented Sep 23, 2022 •

Copy link
Copy Markdown
Contributor

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

Conflicts

No conflicts as of last run.

@achow101 achow101 closed this Oct 12, 2022
@Empact

Empact commented Oct 12, 2022

Copy link
Copy Markdown
Contributor

Post-close Concept NACK - IMO while it would be nice to give more visibility to these issues (e.g. via a comment to github?), failing CI is out of scale to the problem and can interfere with the iteration pace of development, particularly given the possibility of false positives.

@aureleoules
aureleoules deleted the 2022-07-lint-spellcheck-failure branch November 2, 2022 10:51
@bitcoin bitcoin locked and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants