Add pre-commit with codespell and fix typos#917
Open
jbampton wants to merge 3 commits intoapache:mainfrom
Open
Add pre-commit with codespell and fix typos#917jbampton wants to merge 3 commits intoapache:mainfrom
jbampton wants to merge 3 commits intoapache:mainfrom
Conversation
The codespell hook is self contained and is bootstrapped with pre-commit. There is no need to have codespell installed to run pre-commit. To recreate the codespell ignored words list - codespell.txt - you will need to have codespell installed locally. Ran locally: `codespell --skip='./api/src/main/resources/jakarta/faces' | cut -f2 -d' ' | tr A-Z a-z | sort | uniq > .github/linters/codespell.txt` https://github.com/pre-commit/pre-commit https://pre-commit.com/ https://github.com/codespell-project/codespell https://pre-commit.com/#github-actions-example pre-commit config examples: https://github.com/apache/sedona/blob/master/.pre-commit-config.yaml https://github.com/apache/airflow/blob/main/.pre-commit-config.yaml There are many more hooks we could add for example: https://github.com/pre-commit/pre-commit-hooks
Contributor
|
@jbampton @melloware I'm a bit busy and won't have time until next week |
Contributor
|
@bohmber no rush...I didn't want to merge a pre-commit hook PR without someone like you verifying and approving it. |
volosied
reviewed
Sep 18, 2025
| path: ~/.cache/pre-commit | ||
| key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
| - name: Run pre-commit | ||
| run: pre-commit run --all-files |
Contributor
There was a problem hiding this comment.
I'm sorry for not looking at this sooner!
I see that it mentions --all-files here. Does this mean all files in the project or only those in the pull request? Can it be just the latter?
volosied
reviewed
Sep 18, 2025
Comment on lines
+1
to
+40
| abl | ||
| activater | ||
| afterall | ||
| agains | ||
| als | ||
| ans | ||
| bais | ||
| bu | ||
| cacheing | ||
| checkin | ||
| childs | ||
| compliancy | ||
| curren | ||
| deleteable | ||
| feeded | ||
| fo | ||
| implementor | ||
| implementors | ||
| ist | ||
| mot | ||
| nd | ||
| noe | ||
| notin | ||
| ois | ||
| optiona | ||
| ore | ||
| ot | ||
| overriden | ||
| precence | ||
| resetable | ||
| reseted | ||
| re-use | ||
| seperator | ||
| sie | ||
| slashs | ||
| speakin | ||
| splited | ||
| splitted | ||
| vew | ||
| vie |
Contributor
There was a problem hiding this comment.
Some of these are from the "./api/src/client" directory. Can we ignore that location too?
Contributor
|
This looks good based on my investigation. I don't have many objects -- just that one comment. @bohmber @tandraschko Your thoughts? |
Contributor
|
@jbampton Just following up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The codespell hook is self contained and is bootstrapped with pre-commit. There is no need to have codespell installed to run pre-commit.
To recreate the codespell ignored words list - codespell.txt - you will need to have codespell installed locally.
Ran locally:
codespell --skip='./api/src/main/resources/jakarta/faces' | cut -f2 -d' ' | tr A-Z a-z | sort | uniq > .github/linters/codespell.txthttps://github.com/pre-commit/pre-commit
https://pre-commit.com/
https://github.com/codespell-project/codespell
https://pre-commit.com/#github-actions-example
pre-commit config examples:
https://github.com/apache/sedona/blob/master/.pre-commit-config.yaml
https://github.com/apache/airflow/blob/main/.pre-commit-config.yaml
There are many more hooks we could add for example:
https://github.com/pre-commit/pre-commit-hooks