Re: [PATCH] checkpatch: add check for whitespace before semicolonat end-of-line

From: Joe Perches
Date: Thu May 03 2012 - 11:52:56 EST


On Thu, 2012-05-03 at 06:41 -0700, Eric Nelson wrote:
> >> +# check for whitespace before semicolon - not allowed at end-of-line
> >> + if ($line =~ /\s+;$/) {
> >
> > if ($line =~ /\s+;\s*$/)

> Won't the extra space at end of line be caught by other tests?

Yes it will.

You want the test to find the space before semicolon
whenever it exists.


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