codespell: Prevents embarrassing code

Today is Pick on Kernel Developers’ Spelling Abilities Day.

2014-07-31-lv-c5551-codespell

As if they didn’t have enough work to do, along comes me and codespell to harass them about their spelling mistakes.:\

Spelling is sometimes important though, so a spellchecker specific to code is probably a good idea. And since I have no ability when it comes to creating software, I have to have something to complain about.O_o

codespell is neat stuff, and I don’t say that just because it has a lot of color in it. For one thing, you can step through a folder of code word-by-word, and codespell will give you the chance to correct things interactively.

2014-07-31-lv-c5551-codespell-corrx

Aside from that, codespell can write corrections directly into files, print a summary of the changes it suggested, and access custom dictionaries. There are quite a few other options, include one to — gasp! — strip out all that lovely color.

As I understand it, codespell’s main reference is part of the release, but is derived from Wikipedia’s page of common misspellings for machines (and-or technology).

If you really want to put codespell through its paces, I would suggest matching it head-to-head against something like aspell (or ispell or …). The difficulty in that, of course, is that aspell (or ispell or …) is likely to stumble over any portion of code that doesn’t look like a standard English (or other language) word. Which means codespell might end up saving you time.

And now for my regularly scheduled pity party, where I insist I would make much more use of codespell if I had a stick of programming ability. I’ll spare you that this time; if I had spent a tenth of the time learning to write software as I have moaning about my inability, I’d have come up with something vaguely usable by now.🙄

One thought on “codespell: Prevents embarrassing code

  1. Pingback: hunspell: A spellchecker with vast dictionary support | Inconsolation

Comments are closed.