-
Notifications
You must be signed in to change notification settings - Fork 72
Add pre-commit with codespell and fix typos #917
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
base: main
Are you sure you want to change the base?
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
@jbampton @melloware I'm a bit busy and won't have time until next week |
@bohmber no rush...I didn't want to merge a pre-commit hook PR without someone like you verifying and approving it. |
path: ~/.cache/pre-commit | ||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} | ||
- name: Run pre-commit | ||
run: pre-commit run --all-files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these are from the "./api/src/client" directory. Can we ignore that location too?
This looks good based on my investigation. I don't have many objects -- just that one comment. @bohmber @tandraschko Your thoughts? |
@jbampton Just following up. |
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