Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vay6B-00GcXC-0m for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Dec 2025 15:26:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vay68-006anu-33 for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Dec 2025 15:26:53 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vay68-006anl-25 for pgsql-hackers@lists.postgresql.org; Wed, 31 Dec 2025 15:26:53 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vay67-003W6s-2N for pgsql-hackers@lists.postgresql.org; Wed, 31 Dec 2025 15:26:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 5BVFQiJS3913299; Wed, 31 Dec 2025 10:26:44 -0500 From: Tom Lane To: Ashutosh Bapat cc: Jelte Fennema-Nio , PostgreSQL Hackers , Daniel Gustafsson Subject: Re: Add "format" target to make and ninja to run pgindent and pgperltidy In-reply-to: References: Comments: In-reply-to Ashutosh Bapat message dated "Wed, 31 Dec 2025 19:24:12 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3913297.1767194804.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 31 Dec 2025 10:26:44 -0500 Message-ID: <3913298.1767194804@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ashutosh Bapat writes: > On Wed, Dec 31, 2025 at 5:06=E2=80=AFPM Jelte Fennema-Nio wrote: >> This tries to make running formatting a lot easier for committers, but >> primarily for new contributors. > I generally like the idea. Since perltidy is not enforced regularly > (like pgindent), running it usually ends up modifying files which are > not part of the patch. So I avoid it if not necessary. Do you propose > to make it optional? The other obstacle is that not everybody will have the right version of perltidy installed, but using some other version will create a whole lot of extraneous noise. On the whole I'd recommend not trying to automate the perltidy step yet. Cost/benefit is just not very good. On the substance of the patch: I wonder whether we could make things more reliable by using git metadata to figure out which .h and .c files to point pgindent at. regards, tom lane