Re: [patch] scripts: clean-whitespace.sh

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

 



On Fri, Jun 08, 2007 at 05:02:15PM +0200, Oleg Verych wrote:
> On Fri, Jun 08, 2007 at 04:28:49PM +0200, Sam Ravnborg wrote:
> > On Thu, Jun 07, 2007 at 11:44:59PM -0700, Andrew Morton wrote:
> > > 
> > > Then again, it's a better strategy than trying to read the code ;)
> > > 
> > > Please, tell us what it does, so that we can decide whether we want it in
> > > Linux.
> > 
> > It does the same as cleanfile.pl.
> > I have seen no reason to replace cleanfile.pl with this version.
> 
> It does better whitespace cleanup, than
> 
> scripts/{cleanfile *and* cleanpatch}

Made a short test here.
Added the following to a file:

static sam = "                    ";

clean-whitespace replaced spaces within "" with tabs.
cleanfile did not.

Seems that clean-whitespace has the wrong assumption that any sequence
of <tab-stop>8 spaces<tab-stop> must be replaced with a tab.
It should obviously default to beginning of file.


Running latest cleanfile (it is -mm) on your testfile
gave following output:
cleanfile: ipv6.h
ipv6.h:105: line exceeds 79 characters (89)
ipv6.h:111: line exceeds 79 characters (89)
ipv6.h:350: line exceeds 79 characters (85)
ipv6.h:356: line exceeds 79 characters (85)
ipv6.h:362: line exceeds 79 characters (85)
ipv6.h:386: line exceeds 79 characters (82)
ipv6.h:413: line exceeds 79 characters (85)

And spaces were replaced with tabs only where
it is safe.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux