Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jan 2000 19:54:02 +0100
From:      Jeroen Ruigrok/Asmodai <asmodai@wxs.nl>
To:        Nik Clayton <nik@freebsd.org>
Cc:        Jun Kuriyama <kuriyama@FreeBSD.org>, doc@freebsd.org
Subject:   Re: Patches I have up my sleeve
Message-ID:  <20000118195402.E12908@daemon.ninth-circle.org>
In-Reply-To: <20000113185632.A679@catkin.nothing-going-on.org>; from nik@freebsd.org on Thu, Jan 13, 2000 at 06:56:32PM %2B0000
References:  <19991218195612.A26001@daemon.ninth-circle.org> <19991219212411.B4452@catkin.nothing-going-on.org> <19991220070201.C35359@daemon.ninth-circle.org> <20000113005736.F8876@kilt.nothing-going-on.org> <14461.62120.3444.73195V@localhost.sky.rim.or.jp> <20000113185632.A679@catkin.nothing-going-on.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-On [20000113 20:42], Nik Clayton (nik@freebsd.org) wrote:
>On Fri, Jan 14, 2000 at 12:43:36AM +0900, Jun Kuriyama wrote:
>> From: Nik Clayton <nik@freebsd.org>

>> I cannot agree to use automatic filter like this.  I worry about
>> unexpected trouble.  Is that enough to make these changes by hand?

I am still very much in doubt for this filter.  To clarify, I am not
sure I ACK or NAK it.

>The issue with making the changes by hand is that if someone forgets,
>then you take a repository bloat hit as and when the problem is fixed.

A bit yes.

>Putting in this sort of filter fixes it before the file enters the
>repository, so there's no bloat.

Actually, we are trying to fix two things:

- badly set-up editors

- people whom don't verify for whitespace

And the fix is so simple: 

perl -en 's/[\s\t]*$//;' <file>

This will strip the file of all trailing whitespaces (space and tab) and
modify the file in place.

>Instead of making it a filter, it could just issue a (fatal) error, forcing
>the committer to fix it before they commit.

I am more in favor of this.  But imagine this:

filter in place.

Jim Mock (as example since he's reworking the handbook) commits a large
section, he commits and kaboom, all whitespaces rectified amongst his
commit.  This will make the translators very happy (not).

Also, he just wants to commit and worry about whitespace later then.
Bzzzt.  You can't, commit_prep.pl won't allow it since you haven't
cleaned up the whitespace yet.

>> Should we care about this filter to describe topic like this thread?
>> (It must contain spaces only line in <programlisting>.)

>I can't think of any situations where something like
><programinglisting>
>The next line contains some spaces that are vitally important.
>                 
></programinglist>
>
>would occur.

To second this, I have NEVER, EVER seen any programming language,
configuration file or other sort of text where _trailing_ whitespace was
important to keep around.

I always like to stand corrected though.

Given the reasons above I am leaning more and more towards NAK and have
committers actually take responsibility into their own hands by running
the perl line above.

Heck, if we want a filter, how about patching our .mk files to include a
target, make whitespace to get rid of them.  [Or any other better
suitable make target name which covers the essence.]

I think we're trying to incorporate fixes for something which is
actually more and more a PEBKAC problem and should thus be solved at
that level.

-- 
Jeroen Ruigrok vd W/Asmodai         asmodai@[wxs.nl|bart.nl|freebsd.org]
Documentation nutter/B-rated Coder BSD: Technical excellence at its best  
The BSD Programmer's Documentation Project <http://home.wxs.nl/~asmodai>;
Pleasure's a sin, and sometimes sin's a pleasure...


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




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