Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Mar 2004 18:47:38 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
To:        Colin Percival <colin.percival@wadham.ox.ac.uk>
Cc:        FreeBSD current mailing list <current@freebsd.org>
Subject:   Re: spaces before tabs
Message-ID:  <Pine.BSF.4.53.0403151736230.51220@e0-0.zab2.int.zabbadoz.net>
In-Reply-To: <6.0.1.1.1.20040315164047.03bd0ea8@imap.sfu.ca>
References:  <6.0.1.1.1.20040314234126.03adbc50@imap.sfu.ca> <6.0.1.1.1.20040315164047.03bd0ea8@imap.sfu.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 15 Mar 2004, Colin Percival wrote:

> At 16:28 15/03/2004, David O'Brien wrote:
> >Please no!
> >
> >Not another round of:
> >
> >     ----------------------------
> >     date: 1995/05/30 06:29:28;  author: rgrimes;  state: Exp;  lines: +3 -3
> >     Remove trailing whitespace.
> >     ----------------------------
> >
> >which touches thousands of files.
>
>    Well, I was looking at *leading* whitespace, not *trailing* whitespace...
>
>    Ok, I'll find something else to play with. :-)

perhaps put the patch on the web along with a list of files affected
so that people who work on that file can also incorporate the
changes.


Only by looking at /usr/src/sys/ I can find ~3500 "ignorant" files
with some quick-and-dirty-sh-inline-perl-hack
(including some false positives from txt files and quoted strings).
The follwing numbers are number of "ignorant" lines (one line may
"violate" multiple policies):

# Do not add whitespace at the end of a line (/\s\n$/)
bz@noc:/usr/src/HEAD> grep ^1: style-9-check.out | wc -l
   48370

# do not use more spaces than a tab will produce (/\ {8,}/)
# assuming ts=8
bz@noc:/usr/src/HEAD> grep ^2: style-9-check.out | wc -l
   69900 (33444 with sys/contrib/dev/acpica excluded)

# do not use spaces in front of tabs (/\ \t/)
bz@noc:/usr/src/HEAD> grep ^3: style-9-check.out | wc -l
   14107

# check for non-\n line breaks (/(\r|\r\n)$/)
bz@noc:/usr/src/HEAD> grep ^r: style-9-check.out | wc -l
     903


If you have a well written script to find them please make it
available and let people check sources before committing like
portlint is used for ports.

-- 
Greetings

Bjoern A. Zeeb				bzeeb at Zabbadoz dot NeT
56 69 73 69 74				http://www.zabbadoz.net/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.53.0403151736230.51220>