On Sat, Sep 5, 2020 at 1:42 PM Ed Maste <ema...@freebsd.org> wrote: > On Fri, 4 Sep 2020 at 23:11, Kevin Bowling <kevin.bowl...@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 _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"