-
Notifications
You must be signed in to change notification settings - Fork 90
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 support for codespell checking #1864
Comments
Note that you can also have codespell check you commit messages by using the commit hook
That has caught many a misspelled work in my commit messages :-) |
@betterscientificsoftware/bssw-editorial-board, if no one has an objection, I will post a PR that adds support for .codespell and fixes the misspellings it shows. This does not mean we have to commit to use code-spell. It just means that a local developer (e.g. me) can use codespell on the repo. But note that there is a codespelll GitHub action: |
I fixed a bunch of misspellings and typos found by codespell. Look at how few words I had to list on 'ignore-words-list' in the .codespellrc file.
@betterscientificsoftware/bssw-editorial-board, I just added the PR: that allows codespell to run on the bssw.io repo clean (i.e. by fixing a bunch of spelling errors flagged by the tool and adding some ignored words and files). Without objection, can I merge this? Then we can add a GitHub Action to run codespell on all PRs so this stays clean. |
I copied this from the TriBITS repo which was provided by Kyle Edwards from Kitware (this is what they use for CMake).
I was using codespell 2.2.6 locally and it has a slightly different word list. No big deal.
FYI: PR: adds the GHA to run codespell on both the files and the commit messages. Once that PR is merged, then this issue can be closed. |
I copied this from the TriBITS repo which was provided by Kyle Edwards from Kitware (this is what they use for CMake).
I was using codespell 2.2.6 locally and it has a slightly different word list. No big deal.
CC: @betterscientificsoftware/bssw-editorial-board @bernhold and @markcmiller86, I have been looking a little bit for an alternative for
Compare the above to
There really is not much out there that is cross platform and can run as a command (i.e. MS Code Spell Check is out). So there is no advantage of At this point, I see a few options:
Given that I don't have a lot of funding left, my vote would be to go with option-1 and see how that goes. (Otherwise, the default is option-0 which has lead to a lot of easy-to-catch misspellings to get into published articles on bssw.io.) Opinions? |
@bartlettroscoe thanks for investigating. I agree that option 1 is probably the best path forward at present. Let's see how it works. Just to add my own perspective on things...
|
Yeah, lets go with option 1 but with a caveat if practical...when we add words to the global list, can we adopt a practice of associating what file(s) the words appear in so that if we move to option 2, we can refactor the word list easily? |
Does the codespell ignore list file have any concept of comments? If not, we'd probably need to encourage people to put them in the PR comments. |
Currently, no PR checks have to pass to allow the merge of a PR in the bssw.io GitHub repo. The checks are only for informational purposes. (Of course you can change the settings in the GitHub project to require some or all GHA actions to pass before a PR is allowed to merge.)
You can add comments to the Lines 6 to 7 in 054dd1b
Those comments can be added. But that is not really needed because you can find out what files have certain words automatically by just removing the ignored word from the list
and ran
And that can't be wrong when comments can be wrong. For that reason, I would not bother to comment what words come from what files. (And that will not be correct if new files are added that contain those words.) It will be a lot easier to switch to per-file ignores (if we move to that in option-2 above) using this approach than it was fixing all of the spelling errors in PR #1873😊
There was no suggestion to check the comments in GitHub Issues or PRs.
Generally, I hate working with systems where it is difficult/impossible to reproduce the online automated checks. It is just more efficient to run whatever subset of checks makes sense on your local development machine before you push to when you are trying to reproduce and verify the fix for an online check failure. That greatly reduces the wall-clock time to address failures in the online automated checks. |
I just merge PR: Let's see how option-1 above goes. |
FYI: I just added new issue #2074 to take advantage of new inline ignores for codespell. |
@betterscientificsoftware/bssw-editorial-board
Related Issues:
Description
As I mentioned in #334 (comment), I have some experience with the tool codespell. It checks for commonly misspelled words and is pretty easy to work with. I am looking at setting it up for the
bssw.io
Git repo with the config file.codespellrc
and it seems to be showing a lot of misspellings that we have missed shown below (as of the commit 392d0c3):
codespell run on bssw.io repo as of commit 392d0c3 (click to expand)
Some of those are proper names like "Nam" (from "Hai Ah Nam") but many others look to be misspellings.
Tasks
.codespell
file and fix all of the spelling errors in all of the files in bssw.io ... See PR Add support for codespell (#1864) #1873The text was updated successfully, but these errors were encountered: