-
Notifications
You must be signed in to change notification settings - Fork 1.3k
pre-commit: add codespell to check spelling
#8197
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
pre-commit: add codespell to check spelling
#8197
Conversation
e178a59 to
8306ce5
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8197 +/- ##
============================================
- Coverage 15.53% 15.53% -0.01%
Complexity 11966 11966
============================================
Files 5492 5492
Lines 480929 480929
Branches 60325 62046 +1721
============================================
- Hits 74710 74708 -2
- Misses 397957 397959 +2
Partials 8262 8262
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
looks good @jbampton . Should we consider the contents of codespell.txt as a list of nouns to review/improve? |
|
Hey @DaanHoogland yes we need to review We can also exclude files/folders from spell checking if needed. |
|
@jbampton , there is a bunch of PRs going on with "polish" in the name. I think this is a bit related to some of that work, And I think we should not exclude any folders. It might be worth to run this without the codespell.txt and analyse how much work it would be to clean it. I think in the end we do want to maintain a short list in that file. I.E. we do want "cloudstack" (not in the file) and "attache" to be allowed for instance. ;) |
|
@blueorangutan package |
|
@jbampton a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9600 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-10215) |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-10244)
|
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
f3cdda3 to
b96dcd0
Compare
DaanHoogland
left a comment
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.
@jbampton any sugestions for followup work on this? I pointed out two obviously wrong words but saw a lot more.
| name: run codespell | ||
| description: Check spelling with codespell | ||
| args: [--ignore-words=.github/linters/codespell.txt] | ||
| exclude: ^ui/package\.json$|^ui/package-lock\.json$|^ui/public/js/less\.min\.js$|^ui/public/locales/.*[^n].*\.json$ |
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.
@DaanHoogland I am now excluding some files from spell checking
|
@blueorangutan package |
|
@jbampton a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10281 |
DaanHoogland
left a comment
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.
@jbampton I like this kind of ruling but making it consistent is going to ask a lot, is it? as said earlier I still see a lot of danglish and franglish..
| authenitcation | ||
| authenitication | ||
| availiability | ||
| avialable |
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.
shouldn't be in should it?
| confg | ||
| configruation | ||
| configuable | ||
| conneciton |
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.
this doesn't seem right either.
| reseted | ||
| reseting | ||
| resorce | ||
| responser |
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.
responder I would say. not sure if this makes sense to allow
| shoule | ||
| sie | ||
| signle | ||
| simplier |
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.
should this be simpler?
| throught | ||
| ths | ||
| tipically | ||
| transction |
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.
| transction | |
| transaction |
|
Hey @DaanHoogland the list of words in Basically codespell ignores those words when it runs the spell check. So this PR is just adding the codespell test and making sure it passes. You can see that on the last commit in this PR we are regressing and new misspelled words have been added. So until we get this PR merged misspelled words will continue to be added the codebase. In future as we clean up and and fix spelling we will recreate the ignored word list hopefully with less misspelled words each time. |
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
If I understood correctly, the |
|
Hey @JoaoJandre yes you are correct. I have been working on spelling fixes for a while now and have a couple of PRs in progress with spell fixes. |
JoaoJandre
left a comment
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.
LGTM. I saw some PRs that fixed spellings in the past and always thought that they would eventually have to be redone as new misspellings are introduced constantly. With this change we should eventually be able to fix every misspell on the codebase :)
Description
This PR adds
codespellto our pre-commit hooks.The words in
codespell.txtare ignored and this file has basically been created by running:codespell . | cut -f2 -d' ' | tr A-Z a-z | sort | uniq > codespell.txtfrom the repo root.
https://github.com/codespell-project/codespell
codespellis one of the leading spell checkers on GitHub.Going forwards we will need to fix a lot of the misspelled words that are in
codespell.txtTypes of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
pre-commit run codespell --all-filesOr to run all the hooks:
pre-commit run --all-filesHow did you try to break this feature and the system with this change?