Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a spell check ci that will fail future PRs #1660

Closed
wants to merge 1 commit into from

Conversation

enjoy-binbin
Copy link
Member

@enjoy-binbin enjoy-binbin commented Aug 10, 2023

This PR adds a spell checker CI action that will fail
future PRs if they introduce typos and spelling mistakes.

This spell checker is based on blacklist of common spelling
mistakes, so it will not catch everything, but at least it
is also unlikely to cause false positives.

closing in favor of #1663

This PR adds a spell checker CI action that will fail
future PRs if they introduce typos and spelling mistakes.

This spell checker is based on blacklist of common spelling
mistakes, so it will not catch everything, but at least it
is also unlikely to cause false positives.
@enjoy-binbin
Copy link
Member Author

enjoy-binbin commented Aug 10, 2023

I am not sure whether the apache license is in conflict with this (https://github.com/codespell-project/codespell), please help me to check.
If conflict, i will remove the CI and refresh the PR with only the typo fix.

here is am example: https://github.com/apache/kvrocks/actions/runs/5818954638/job/15776396946?pr=1660#step:5:7

Used config files:
    1: ./.codespell/.codespellrc
./kvrocks.conf:569: Leve ==> Level, Levee

more info:

# A CI action that using codespell to check spell.
# .codespell/.codespellrc is a config file.
# .codespell/wordlist.txt is a list of words that will ignore word checks.
# More details please check the following link:
# https://github.com/codespell-project/codespell

used to mention in #1591 (comment)

@@ -320,7 +320,7 @@ void Geo::scoresOfGeoHashBox(GeoHashBits hash, GeoHashFix52Bits *min, GeoHashFix
* 'max', appending them into the array of GeoPoint structures 'gparray'.
* The command returns the number of elements added to the array.
*
* Elements which are farest than 'radius' from the specified 'x' and 'y'
* Elements which are farther than 'radius' from the specified 'x' and 'y'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* Elements which are farther than 'radius' from the specified 'x' and 'y'
* Elements which are farthest than 'radius' from the specified 'x' and 'y'

Copy link
Member Author

Choose a reason for hiding this comment

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

since there is a than, i think it should be farther? (although i am not sure about it)

@PragmaTwice
Copy link
Member

PragmaTwice commented Aug 10, 2023

I am not sure whether the apache license is in conflict with this (https://github.com/codespell-project/codespell), please help me to check.

It is OK to use a GPL licensed project to do spell check, as we also use GCC in CI to build kvrocks : )

@tisonkun
Copy link
Member

I'd suggest we use https://github.com/crate-ci/typos which is easy to install and also licensed under MIT OR Apache-2.0

@enjoy-binbin
Copy link
Member Author

It is OK to use a GPL licensed project to do spell check, as we also use GCC in CI to build kvrocks : )

good to know, thanks for the confirmation!

@@ -0,0 +1,4 @@
[codespell]
Copy link
Member

Choose a reason for hiding this comment

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

I think we can move these files to .github/config.

@tisonkun tisonkun mentioned this pull request Aug 10, 2023
@enjoy-binbin
Copy link
Member Author

closing in favor of #1663

@enjoy-binbin enjoy-binbin deleted the spell_check_ci branch August 11, 2023 02:21
enjoy-binbin pushed a commit that referenced this pull request Aug 11, 2023
This PR adds a typo checker CI action that will fail
future PRs if they introduce typos and spelling mistakes.

This supersedes and thus closes #1660.

Signed-off-by: tison <[email protected]>
Co-authored-by: Viktor Szépe <[email protected]>
p1u3o pushed a commit to p1u3o/incubator-kvrocks that referenced this pull request Aug 15, 2023
This PR adds a typo checker CI action that will fail
future PRs if they introduce typos and spelling mistakes.

This supersedes and thus closes apache#1660.

Signed-off-by: tison <[email protected]>
Co-authored-by: Viktor Szépe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants