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 1pRYt2-0005oE-AJ for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Feb 2023 13:28:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pRYt1-0004LY-0k for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Feb 2023 13:28:51 +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 1pRYt0-0004LO-NE for pgsql-hackers@lists.postgresql.org; Mon, 13 Feb 2023 13:28:50 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRYsy-0001kG-Sh for pgsql-hackers@postgresql.org; Mon, 13 Feb 2023 13:28:50 +0000 Received: (Authenticated sender: adsend@dunslane.net) by mail.gandi.net (Postfix) with ESMTPSA id 874D2FFAF1; Mon, 13 Feb 2023 13:27:38 +0000 (UTC) Content-Type: multipart/alternative; boundary="------------rJpITtX2XzVywuKh8JwgNBQR" Message-ID: Date: Mon, 13 Feb 2023 08:27:37 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: run pgindent on a regular basis / scripted manner Content-Language: en-US To: Tom Lane Cc: Jelte Fennema , "shiy.fnst@fujitsu.com" , Robert Haas , Justin Pryzby , Andres Freund , Noah Misch , Peter Geoghegan , Bruce Momjian , Magnus Hagander , Alvaro Herrera , Stephen Frost , Jesse Zhang , "pgsql-hackers@postgresql.org" References: <3d67bc80-4de2-5ba8-e272-e4ad2e59ba04@dunslane.net> <4ac8f263-f1bb-faa5-a307-1fffe00f0e3e@dunslane.net> <0f074818-b01a-799f-3c74-5fb5deab1d23@dunslane.net> <1d66447e-a77b-ca0d-90a0-782800e85383@dunslane.net> <390e7b04-11f3-f715-7a7d-d1a9077fbea8@dunslane.net> <00885533-! ff96-2a95-7911-329c873b3029@dunslane.net> <842819.1676219054@sss.pgh.pa! .us> <22af2c75-73a6-beab-e376-0e56cbe9a97d@dunslane.net> <961094.1676236415@sss.pgh.pa.us> From: Andrew Dunstan In-Reply-To: <961094.1676236415@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------rJpITtX2XzVywuKh8JwgNBQR Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2023-02-12 Su 16:13, Tom Lane wrote: > Andrew Dunstan writes: >> On 2023-02-12 Su 11:24, Tom Lane wrote: >>> It seems like "indent the whole tree" is about to become a minority >>> use-case. Maybe instead of continuing to privilege that case, we >>> should say that it's invoked by some new switch like --all-files, >>> and without that only the stuff identified by command-line arguments >>> gets processed. >> I don't think we need --all-files. The attached gets rid of the build >> and code-base cruft, which is now in any case obsolete given we've put >> pg_bsd_indent in our code base. So the way to spell this instead of >> "pgindent --all-files" would be "pgindent ." > Ah, of course. > >> I added a warning if there are no files at all specified. > LGTM. Thanks, pushed. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------rJpITtX2XzVywuKh8JwgNBQR Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit


On 2023-02-12 Su 16:13, Tom Lane wrote:
Andrew Dunstan <andrew@dunslane.net> writes:
On 2023-02-12 Su 11:24, Tom Lane wrote:
It seems like "indent the whole tree" is about to become a minority
use-case.  Maybe instead of continuing to privilege that case, we
should say that it's invoked by some new switch like --all-files,
and without that only the stuff identified by command-line arguments
gets processed.

      
I don't think we need --all-files. The attached gets rid of the build 
and code-base cruft, which is now in any case obsolete given we've put 
pg_bsd_indent in our code base. So the way to spell this instead of 
"pgindent --all-files" would be "pgindent ."
Ah, of course.

I added a warning if there are no files at all specified.
LGTM.


Thanks, pushed.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------rJpITtX2XzVywuKh8JwgNBQR--