Re: spaces before tabs

From: Bjoern A. Zeeb <bzeeb-lists_at_lists.zabbadoz.net>
Date: Mon, 15 Mar 2004 18:47:38 +0000 (UTC)
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_at_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_at_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_at_noc:/usr/src/HEAD> grep ^3: style-9-check.out | wc -l
   14107

# check for non-\n line breaks (/(\r|\r\n)$/)
bz_at_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/
Received on Mon Mar 15 2004 - 09:50:11 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:47 UTC