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...

Warner Losh imp at bsdimp.com
Sat Sep 5 20:41:42 UTC 2020


On Sat, Sep 5, 2020 at 1:42 PM Ed Maste <emaste at freebsd.org> wrote:

> On Fri, 4 Sep 2020 at 23:11, Kevin Bowling <kevin.bowling at kev009.com>
> wrote:
> >
> > An arbitrary formater may leave a
> > little bit of annoyance to each person's taste, but that is a tiny
> > drop in the bucket compared to never having to discuss and especially
> > correct (which may /seem/ helpful but is pretty offputting to
> > newcomers).
>
> As an experiment I ran clang-format over an arbitrary file
> (vtfontcvt.c) and put the results in
> https://reviews.freebsd.org/D26340
>
> Relative to the original file there are a few style(9) items that have
> been fixed, a few that have been broken, and some that are arguably
> worse but really indifferent.
>
> Fixed:
> - *_FOREACH now has a space before (, equivalent to for (;;)
>

Except pretty much everywhere we don't have a space there...


> - header sorting
> - space between sizeof and ( removed
> - indentation of an if body
> - unwrapped function call that fits on one line
>
> Broken:
> - indentation of if / for conditions that span 2 or more lines
>
broke all alignment of variables and comments that were done.
broke all err() calls to wrap too much
broke purposely outdented code in statistics function
extra headers still included.


>
> Indifferent:
> - lose lined-up struct members or comments
>

This will cause a huge amount of churn, and is a needless change. It makes
things harder to read. Though this alignment style has been slowly waining
after being popular early on...

The comments moving is a bigger problem for the worse.


> - space vs tab after #define
> - newlines before quoted function arguments
>

Also a problem since it introduces more verticality.


> - function argument wrapping (see write_glyph_buf)
> - leading indentation and args-per-line (print_font_info)
>

An interesting experiment, but there's far more worse after than before.
The rearranging of carefully aligned elements is an especially galling
change for some people (myself included).

Warner


More information about the svn-src-all mailing list