Re: [PATCH] kernel source spellchecker

jw schultz
2003-03-02T03:35:37Z

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