Re: [PATCH V3] checkpatch: check for whitespace before semicolon atEOL

From: Joe Perches
Date: Mon May 28 2012 - 11:12:33 EST


On Mon, 2012-05-28 at 15:42 +0100, Andy Whitcroft wrote:
> On Sun, May 27, 2012 at 05:00:46PM -0700, Eric Nelson wrote:
> > +# check for whitespace before a non-naked semicolon
> > + if ($line =~ /^\+.*\S\s+;/) {
> > + CHK("SPACING",
> > + "space prohibited before semicolon\n" . $herecurr);
> > + }
> > +
>
> Would this not also falsly trigger on 'for (foo = 10; foo; foo--) {' ?

No, it checks for a non-space, then requires whitespace before the semi


--
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/