From owner-svn-src-head@freebsd.org Fri Sep 4 18:15:07 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E999A3CAD43; Fri, 4 Sep 2020 18:15:07 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bjm6z1FfTz4PPR; Fri, 4 Sep 2020 18:15:06 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.1.2] (pool-74-110-137-7.rcmdva.fios.verizon.net [74.110.137.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 4EFBC270033E; Fri, 4 Sep 2020 14:15:05 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 4EFBC270033E DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1599243305; bh=v9/u4lB3u1mEodHLzi588LmaRUoD1A+bFCuGi9NuQ5I=; h=Subject:To:From:Date:From; b=BCaAV3SQK+Z/q7C+7tutGeaM91SQcO9DY6qZ+tUfYM2LKUGewh38tTwnnRu+KVjFh osYJIwaIBnRwp2EbdtcXjZL/Fc+vr9LOTxnIHl0T+t/HHwsoPvH3YAMwAfvk3AoMK4 zqiS3Z86OBLC65mJgtvSL5JPPWhgbPwrylrYqxDC3JXDlkzXkjQ8cH8F8hIyAMZone 2GSmT3x6FXVqWt0kqeRm39rNeT0xITCLlLt1DF4wy8EAbBIWIoBvwsR5OcUHCufP4U TTOAuhBBCORfW4taa/y5Cn8ZsMsVODdqkLgSXsTOJ5fxKwYFL+cj/AW9r3rNfXpbBJ ++DKy6REQJcqg== 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... To: Alexey Dokuchaev , Michael Tuexen Cc: Pedro Giffuni , Mateusz Guzik , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202009012119.081LJERb018106@repo.freebsd.org> <95844C00-D10A-456D-AD29-DF572043074F@fh-muenster.de> <20200902020507.GA38274@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> From: Andrew Gallatin Message-ID: <60ea593f-8258-e30d-b897-f162168b44d3@cs.duke.edu> Date: Fri, 4 Sep 2020 14:15:04 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20200903024226.GA54078@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Bjm6z1FfTz4PPR X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.duke.edu header.s=mail0816 header.b=BCaAV3SQ; dmarc=pass (policy=none) header.from=cs.duke.edu; spf=pass (mx1.freebsd.org: domain of gallatin@cs.duke.edu designates 152.3.140.1 as permitted sender) smtp.mailfrom=gallatin@cs.duke.edu X-Spamd-Result: default: False [-5.01 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[cs.duke.edu:s=mail0816]; FREEFALL_USER(0.00)[gallatin]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:152.3.140.0/23]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-0.997]; DWL_DNSWL_LOW(-1.00)[duke.edu:dkim]; RCVD_IN_DNSWL_LOW(-0.10)[152.3.140.1:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cs.duke.edu:+]; DMARC_POLICY_ALLOW(-0.50)[cs.duke.edu,none]; RCPT_COUNT_SEVEN(0.00)[7]; NEURAL_HAM_SHORT(-0.94)[-0.938]; RECEIVED_SPAMHAUS_PBL(0.00)[74.110.137.7:received]; NEURAL_HAM_MEDIUM(-0.97)[-0.972]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13371, ipnet:152.3.128.0/17, country:US]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all,svn-src-head]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Sep 2020 18:15:08 -0000 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