-
Notifications
You must be signed in to change notification settings - Fork 144
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 codespell
pre-commit and fix revealed errors
#2819
Conversation
If there was something which could handle US English + custom dictionary well. But as a minimal bar it is OK, IMO. |
A lot of false negatives that would have to be amended somehow, but it seems to be
|
That would be more along the lines of |
I don't know much about spell checking, but one thing I'm curious about is integration of custom dictionaries to IDEs. In essence, IDE marks a word as potentially wrong and user can mark it as false-positive, which saves the word to a dictionary. That file is then being distributed within the repo, so other people can take advantage of it, as well as add to it and of course it could be used for CI/pre-commit checks. At least that's how I imagine it. Does it make sense? Can codespell or other tool facilitate it? |
IDE -> codespell/other tool would be tricky because the IDE would need to know and use the specific tool for that spell checking. I don't see any obvious integration for that in my PyCharm. Technically if everyone is on pycharm the I have noticed PyCharm has the option to include a specific word-list file, but I can't get it to open the |
As for pycharm, it looks like I can add text file like the codespell.txt you have here, but it needs to to have |
Oh interesting, we can definitely rename it. Did you check if it had any effect? |
It works. I cannot add words to it through the Pycharm UI, but it does use those words for spell checking. sidenote: I've tried to mark the .txt as "spellchecking dictionary file type", but that didn't work. It has to be |
Oh, also about the configuration:
|
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 like it :) Briefly look if there is any suitable alternative to codespell, but haven't found any, so tool choice is great from my PoV.
Added just a couple of comments.
Sure. It's a reflex from other projects that prefer such a style. I think for commits I don't have them, but if I do, can you point them out? External contributors do not have access to labels, so would probably have to be other that add the appropriate labels. |
commit style guide: https://tmt.readthedocs.io/en/stable/contribute.html#commits |
+1 from me, all that remains to be resolved is the question of changes to the changelog in the spec file, on which I have no opinion, actually, so hoping for wiser ones to appear, comment and decide :) |
#2880 I'd like to bring the changelog up at nearest opportunity. |
For sure. Do we keep this PR waiting on the specfile to change to |
IMO it would be better to merge this first, spec changes might slip into next release (or not). |
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.
@LecrisUT nice work, so many typos missed by poor human reviewers!
+1, the specfile changes PR, while ready for review, is not trivial and needs a lot of eyes (and testing). |
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.
Just a nitpick.
Signed-off-by: Cristian Le <[email protected]>
codespell
pre-commitcodespell
pre-commit and fix revealed errors
/packit build |
When comparing with the sphinx spellchecker (PyEnchant), that one is way more aggressive and does not handle dictionary additions well. On the other hand, this one only checks common spellchecking errors and does not check against an extensive dictionary. I've seen projects use it as a minimum spellchecker. What do you guys think? Check the pre-commit failure for what it picked up
Related to #2661