Re: smatch_scripts/whitespace_only.sh

From: Dan Carpenter
Date: Thu Mar 11 2010 - 05:00:26 EST


On Wed, Mar 10, 2010 at 10:11:49AM -0800, Joe Perches wrote:
> On Wed, 2010-03-10 at 15:38 +0100, Julia Lawall wrote:
> > > > On Wed, 10 Mar 2010, Dan Carpenter wrote:
> > > > > I wrote a script to check that a patch only changes white space.
>
> Perhaps you could use #define __LINE__ 0 to avoid
> any vertical line position comparison checks?
>

I tried something similar to that at first but I found that line
numbers were used in other ways. In the end, I added a -no-lineno to
sparse so it thinks everything is on line 123456.

It might be better to just right a perl script that strips out all the
whitespace and compares the result blobs before and after the patch.
That would handle the #if 0 code as well.

regards,
dan carpenter

> > Maybe checkpatch could be changed to not complain about > 80 characters
> > when the line contains a string?
>
> That's been at least partially done in commit
> 691e669ba8c64d31ac08d87b1751e6acfa3ff65e
--
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/