Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1psKNb-0003aV-7D for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Apr 2023 09:27:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1psKMa-0006fL-8m for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Apr 2023 09:26:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1psKMZ-0006fC-VF for pgsql-hackers@lists.postgresql.org; Fri, 28 Apr 2023 09:25:59 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1psKMS-005YKn-6M for pgsql-hackers@postgresql.org; Fri, 28 Apr 2023 09:25:59 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id BDEF45C0105; Fri, 28 Apr 2023 05:25:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 28 Apr 2023 05:25:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1682673948; x= 1682760348; bh=jkfGqFh5gXvsD+QEYmL8WWMHuzh2NoBuTOSl4wEcOV0=; b=H XkhlJV/gusM+eAO02yrUt/fxMReIXCFGspI6v7OVRC6JGTG6XNbcAUOULOeDFpz0 6U/c6z5nZFS4TtoQH/4IDJbS0tYviwSY37T72KbrRYvdHEnW9u0lYIgimFVBLQQp w4TJGkc5PfdpG8k+KuzTo+/grJokQbo8BTHcbQph2/uC2n+i4+PWSv2tote6KxR3 sglDq887E8MZh9UirENdHPwycmbd53pOVD+QngCgZQvhLHdxiJxP7wJBjiLTUS6M BBPmGXNtomB1T4sS16K4Ja0MvObWGGj4qf/uVxtu3LIUIYgInVk3zB0BWSVcFnal 0+In7uyrp5FmFiNLixlGg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedukedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffhjeejhffgieeuueekjeek fffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 28 Apr 2023 05:25:47 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 2B61FDB6; Fri, 28 Apr 2023 11:25:45 +0200 (CEST) Date: Fri, 28 Apr 2023 11:25:45 +0200 From: Alvaro Herrera To: Andrew Dunstan Cc: Andres Freund , Noah Misch , Tom Lane , Jelte Fennema , Peter Geoghegan , Bruce Momjian , Magnus Hagander , Stephen Frost , Jesse Zhang , PostgreSQL-development Subject: Re: run pgindent on a regular basis / scripted manner Message-ID: <20230428092545.qfb3y5wcu4cm75ur@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <47011581-ddec-1a87-6828-6edfabe6b7b6@dunslane.net> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Feb-05, Andrew Dunstan wrote: > So here's a diff made from running perltidy v20221112 with the additional > setting --valign-exclusion-list=", = => || && if unless" I ran this experimentally with perltidy 20230309, and compared that with the --novalign behavior (not to propose the latter -- just to be aware of what else is vertical alignment doing.) Based on the differences between both, I think we'll definitely want to include =~ and |= in this list, and I think we should discuss whether to also include "or" (for "do_stuff or die()" type of constructs) and "qw" (mainly used in 'use Foo qw(one two)' import lists). All these have effects (albeit smaller than the list you gave) on our existing code. If you change from an exclusion list to --novalign then you lose alignment of trailing # comments, which personally I find a loss, even though they're still a multi-line effect. Another change would be that it ditches alignment of "{" but that only changes msvc/Install.pm, so I think we shouldn't worry; and then there's this one: -use PostgreSQL::Test::Utils (); +use PostgreSQL::Test::Utils (); use PostgreSQL::Test::BackgroundPsql (); which I think we could just change to qw() if we cared enough (but I bet we don't). All in all, I think sticking to --valign-exclusion-list=", = => =~ |= || && if or qw unless" is a good deal. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Ellos andaban todos desnudos como su madre los parió, y también las mujeres, aunque no vi más que una, harto moza, y todos los que yo vi eran todos mancebos, que ninguno vi de edad de más de XXX años" (Cristóbal Colón)