Finding typos using codespell

J. Hellenthal jhell at DataIX.net
Wed Apr 20 00:17:44 UTC 2011


On Tue, Apr 19, 2011 at 02:22:10PM +0200, Ulrich Spörlein wrote:
>On Tue, 19.04.2011 at 12:15:00 +0100, Bruce Cran wrote:
>> There's a new tool that can be used to find spelling mistakes in code: codespell 
>> from http://www.politreco.com has already been used to find mistakes in both 
>> Linux and LLVM. I ran it on sys/ and it found lots of potential typos - the 
>> full diff (which I know does contain some incorrect changes) can be found at 
>> http://www.cran.org.uk/~brucec/freebsd/codespell_sys.diff .
>
>Needs manual review, but I think this is very useful for the spelling
>nazi challenged among us :-)
>
>False positive, e.g.:
> {
>-       struct ccb_immed_notify *inot;
>+       struct ccb_immed_notify *into;
>        mpt_tgt_state_t *tgt;
>
>Cheers,
>Uli

As mentioned here already changes that I have noticed are:

(Upper || lower case):
inot -> into
lsat -> last
inbetween -> between
ALOT -> A LOT
boundry -> boundary	"This one seems to have corrected itself."
virtualY -> virtually
ID -> DID
lastr -> last
*Any uuencoded file*

This was just a review of the functional changes. The no-op changes I
just filtered out of the patch to quickly catch the "Bad Thing" changes
above.

It might just be better to build a list of files with spelling errors
and anyone with the next commit to any of those files just runs it
through aspell/ispell or whatever they like rather than causing this
much of a slush.

All in all good find Bruce!.

-- 

 Regards,
 J. Hellenthal
 WWJD

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 522 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20110420/5883230f/attachment.pgp


More information about the freebsd-current mailing list