Re: [PATCH] kernel source spellchecker

From: jw schultz (jw@pegasys.ws)
Date: Sat Mar 01 2003 - 22:45:56 EST


On Sat, Mar 01, 2003 at 01:20:09PM -0800, Dan Kegel wrote:
> Steven Cole wrote:
> >Once you've loosed your beast upon the tree, I'd suggest that you
> >very carefully look through the resulting diff for inappropriate
> >corrections and redact the unnecessary hunks. In the spelling fixes
> >which I sent to Linus, I redacted hunks which didn't need fixing. For
> >example, Linus making fun of Sun folks' ability to spell, etc. and some
> >comments in French or German for which the spelling was correct in those
> >languages.
>
> Good points.
>
> >In addition to making fixes in the comments in the source, all of
> >Documentation should be fair game.
>
> Yeah, but that's easy :-)
>
> >Then you'll have to contend with the folks whose out-of-tree patches
> >you've borked.
>
> That's a good argument for making the spellfix program polished
> enough that everyone can use it, I think. Those maintaining
> out-of-tree patches can run the tool on their tree, and regenerate
> diffs.

An ispell filter seems a simpler approach to me. (ispell -F
filter) I use that (shown here to head off requests) for
email so quoted content is ignored. A similar filter for C
source would make this trivial.

$ grep ispell .muttrc
set ispell="ispell -F maildequote"
$ cat bin/maildequote
#!/usr/bin/perl

while (<STDIN>)
{
        /^[>|] / || /^On .* wrote:$/ and tr[A-Za-z][_];
        print $_;
}
print "\004";

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw@pegasys.ws

Remember Cernan and Schmitt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 07 2003 - 22:00:17 EST