Date: Fri, 4 Sep 2020 14:15:04 -0400 From: Andrew Gallatin <gallatin@cs.duke.edu> To: Alexey Dokuchaev <danfe@freebsd.org>, 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: <60ea593f-8258-e30d-b897-f162168b44d3@cs.duke.edu> In-Reply-To: <20200903024226.GA54078@FreeBSD.org> 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> <20200903024226.GA54078@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-09-02 22:42, Alexey Dokuchaev wrote: >> 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. > I do the upstream sync between the Netflix tree and FreeBSD-current about every 3 weeks (unless glebius beats me to the punch and does it first :). I anticipate that this blank line sweep will cause lots of conflicts for us. I understand this is progress, and I don't object, and I'm not asking for a revert, but please understand that cleanups like this do have hidden costs. I expect that other commercial entities who contribute to FreeBSD will have the same issue, and I also anticipate it will cause problems with MFCs Rather than doing more sweeps like this, is it possible to come up with a clang-format rule that's 95% of style(9), do just one more sweep of the tree to apply that rule, add that rule as a pre-commit hook, and be done forever with style(9) related changes? Thanks, Drew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?60ea593f-8258-e30d-b897-f162168b44d3>