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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux