Fix as many spelling mistakes as possible#572
Conversation
|
As a reader of the docs, I noticed a few misspellings, but there ended up being more than I could fix by hand, so I went looking for tools to help. I started out using Vale, but decided on sphinxcontrib-spelling in the end, since the format of the config file ( If you, the maintainers, are not happy with my use of sphinxcontrib-spelling's It seemed inadvisable to do so with words that seemed likely to be actual misspellings or mis-capitalizations elsewhere, like |
6ed2d60 to
f6f0458
Compare
|
Thank you for your contribution. That approach is much appreciated. We will take a closer look soon and come back here. |
|
I am impressed how many typos and spelling errors we've generated - thanks for the effort ... this really looks pretty good - could you please separate the implementation from the actual spelling fixes - then I'd say LGTM. |
You all are writing code and building products and working in two languages, so no judgements from me. I'm happy to be able to help. Is the "implementation" part actually a useful contribution (to submit as a second PR), or… should I simply elide those Makefile modifications altogether? No hard feelings either way. |
|
Thanks, for the kind words :D |
416cf9c to
ac07841
Compare
Uses the `make fix-spelling` target introduced by PR Nitrokey#572
Uses the `make fix-spelling` target introduced by PR Nitrokey#572
@daringer OK, this is done. I would welcome feedback about how useful you think the Vim parts will actually be. If no one on your team uses that editor, then those parts of the Makefile are probably just a maintenance liability. The commit message for ac07841 describes the process I used. I have also updated the README (locally) with the same information, but I'll do that in a separate PR, once this is merged, if that's okay. |
|
hey, for delaying this further - I am a big fan of the vim-workflow - would keep it for now! |
Yes, will do! I'll @-mention you again when it's ready, just in case GitHub doesn't send a distinctive enough notification. |
These two new Makefile targets allow you to: - identify potential misspellings with sphinxcontrib-spelling[1] - (optionally) add them to a custom word list, and - loop through all the misspelled files, opening them with your $EDITOR. Run `make check-spelling` (alias: `spell`) to start the process, followed by `make fix-spelling` (aliases: `fix` or `correct`). A list of _correct_ spellings (which will not be flagged by the Sphinx extension) is contained in `wordlist.txt`. The `check-spelling` target gives you the opportunity to update this word list if new (putative) misspellings are identified. The `fix-spelling` target works best with Vim/Neovim. It employs the `hlsearch` and quickfix features to make it easier to find and correct spelling mistakes in the individual source files. For other editors, the misspelled file and the list of misspellings identified by sphinxcontrib-spelling are simply passed as command-line arguments. [1]: https://sphinxcontrib-spelling.readthedocs.io
Uses the `make fix-spelling` target introduced by PR Nitrokey#572
Uses the `make fix-spelling` target introduced by PR Nitrokey#572
|
@daringer readysetgo! These files had conflicts, if you wanted to scrutinize those specially, e.g., for bad formatting:
Also, a minor point: you feel that replug and replugged are acceptable spellings for your team, just let me know and I'll update the word list and all affected documents. I have pedantically insisted on re-plug and re-plugged here; my take is they haven't been around long enough to become Real Dictionary Words in the sense that reiterate and reevaluate are. For what it's worth, |
|
I looked at the files you pointed out specifically and changed some in #591. Before merging we would need to fix the CI. @mmerklinger could you take a look at these CI errors, please? |
@jans23 sorry! I definitely would've thought twice if I'd known sphinxcontrib-spelling would add a C library dependency. It is mentioned in their docs, but it's buried in the developer section. |
|
@mmerklinger Would you like me to simply omit I think it should be a simple matter to pass an option to conditionally add This should allow CI to run successfully, and won't require the |
|
@ernstki Thanks for your PR!
No, that should be fine. If you could add a note about the Besides, please rebase the PR on the main branch. I made some commits in a separate branch to include a job for spell checking in the CI pipeline. Also I "fixed" the rstcheck. You can either pick this commits on top of your branch, or I will create a separate PR after we merged yours. As you prefer. |
check-spellingandfix-spelling(fix-spellingworks best with the Vim editor)You can run the Make targets like this: