Contribute/SpellCheck: Difference between revisions
Stefan Weil (talk | contribs) (Add page on usage of codespell with QEMU) |
(deprecate old way for codespell (2011), using checkpatch.pl (2024) now. For admin: considering delete this page.) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
== checkpatch == | |||
Since 2024, we added codespell checking to [https://gitlab.com/qemu-project/qemu/-/blob/master/scripts/checkpatch.pl scripts/checkpatch.pl]. | |||
You can also refer to the previous way: | |||
== codespell == | |||
QEMU uses British or American English in code and documentation. | QEMU uses British or American English in code and documentation. | ||
There are some typical spelling bugs which can be easily avoided | There are some typical spelling bugs which can be easily avoided | ||
Line 19: | Line 27: | ||
* http://git.profusion.mobi/cgit.cgi/lucas/codespell/ (git repository) | * http://git.profusion.mobi/cgit.cgi/lucas/codespell/ (git repository) | ||
* https://github.com/lucasdemarchi/codespell (alternate git repository) | * https://github.com/lucasdemarchi/codespell (alternate git repository) | ||
* http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines | |||
* http://grammar.yourdictionary.com/spelling-and-word-lists/misspelled.html |
Latest revision as of 14:20, 30 June 2025
checkpatch
Since 2024, we added codespell checking to scripts/checkpatch.pl.
You can also refer to the previous way:
codespell
QEMU uses British or American English in code and documentation. There are some typical spelling bugs which can be easily avoided by using tools like codespell.
codespell is a python script which detects (and optionally fixes) the most common spelling bugs.
If you installed codespell in your HOME directory, it can be called from the QEMU source directory like this:
~/bin/codespell.py -d -r -s -x scripts/codespell.exclude -q 2 ~/share/codespell/dictionary.txt .
-x scripts/codespell.exclude excludes some known lines from the check and needs a file which is not yet committed.
External Links
- http://packages.profusion.mobi/codespell/ (download)
- http://git.profusion.mobi/cgit.cgi/lucas/codespell/ (git repository)
- https://github.com/lucasdemarchi/codespell (alternate git repository)