Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 2020 02:42:26 +0000
From:      Alexey Dokuchaev <danfe@freebsd.org>
To:        Michael Tuexen <tuexen@fh-muenster.de>
Cc:        Pedro Giffuni <pfg@freebsd.org>, Mateusz Guzik <mjg@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r365071 - in head/sys: net net/altq net/route net80211 netgraph netgraph/atm netgraph/atm/ccatm netgraph/atm/sscfu netgraph/atm/sscop netgraph/atm/uni netgraph/bluetooth/common netgraph...
Message-ID:  <20200903024226.GA54078@FreeBSD.org>
In-Reply-To: <08636D5E-AA07-4AE7-B5AC-656B08CF564B@fh-muenster.de>
References:  <202009012119.081LJERb018106@repo.freebsd.org> <95844C00-D10A-456D-AD29-DF572043074F@fh-muenster.de> <20200902020507.GA38274@FreeBSD.org> <eba32e79-4b90-ecce-7bbb-455f691d4444@FreeBSD.org> <20200902180626.GA88595@FreeBSD.org> <6124a908-25a5-e023-16da-7963ba229b7f@FreeBSD.org> <08636D5E-AA07-4AE7-B5AC-656B08CF564B@fh-muenster.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 02, 2020 at 11:39:51PM +0200, Michael Tuexen wrote:
> > On 2. Sep 2020, at 20:28, Pedro Giffuni <pfg@FreeBSD.org> wrote:
> > On 02/09/2020 13:06, Alexey Dokuchaev wrote:
> >> On Wed, Sep 02, 2020 at 10:18:15AM -0500, Pedro Giffuni wrote:
> >>> On 01/09/2020 21:05, Alexey Dokuchaev wrote:
> >>>> ...
> >>>> This is common sense.  I can't count how often I wanted to hack on
> >>>> something in the base/kernel and was turned away by this atrocious
> >>>> excessive whitespace mess.
> >>>> 
> >>>> Thank you Mateusz for cleaning this up.
> >>> I honestly don't care much, but spaces do no harm and can make the code
> >>> more readable. Sort of a silent comment, or what you do in written
> >>> language when you start a new paragraph.
> >> Right, but that's the example of appropriate usage of whitespace.  I was
> >> talking about *excessive* whitespace, that is, more than two \n's in a
> >> row if we speak of newlines (subject of these commits).
> > 
> > But how much space is rather subjective so Michael is right in asking
> > what rule has been violated.
> > 
> > No one is asking for the change to be reverted: the damage, if any,
> > is already done.
> 
> Just to be clear: I have NOT asked for reverting, I did not mentioned it.

Wow wow, come down people.  Indeed, no one was asking for reverting and
I don't understand why we're talking about it. :-)

> The why was explained: Some developers don't work on files which
> violate whitespace rules.

Usually they still will, but would often prefer to fix the style issues
first so they don't get in the way.  This is a bit frustrating because,
per style(9), stylistic changes are hard on the source repository (e.g.
they pessimize "svn blame") and should be avoided without good reason,
but we cannot just seat and watch how style bugs accumulate and make the
code harder and harder to work with.

> I want to understand which rules have to be followed (and why).

In general, FreeBSD code we write should follow style(9); it specifically
mentions "do not add whitespace at the end of a line" and "... followed by
one blank line" but doesn't go as far as explicitly forbidding multiple
consecutive newlines.  To me it's pretty obvious, and while others might
have different sens esthe'tique, usually it is lack thereof (no offense)
or mere ignorance.

./danfe

P.S.  Old-school tools like indent(1) or `uncrustify' were never widely
popular, I guess, because they did not possess enough knowledge of the
language to always produce correct results.  Perhaps new era tools, like
clang-format, could bring this to a whole new level.



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