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 1k6ufC-0000EQ-GN for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Aug 2020 11:47:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k6uf9-0002zx-I7 for pgsql-hackers@arkaria.postgresql.org; Sat, 15 Aug 2020 11:47:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6uf8-0002zl-KP for pgsql-hackers@lists.postgresql.org; Sat, 15 Aug 2020 11:47:51 +0000 Received: from wforward3-smtp.messagingengine.com ([64.147.123.22]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k6uf4-0005C2-FY for pgsql-hackers@postgresql.org; Sat, 15 Aug 2020 11:47:49 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailforward.west.internal (Postfix) with ESMTP id DFD1B305; Sat, 15 Aug 2020 07:47:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 15 Aug 2020 07:47:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=c09urZIG/w2iYSvtkbMwPuS+PNazL8KzGEe9wytxE us=; b=j7RWQIXSo01N79UN0ls2DruWxBp6vNXwjjtnbWsvIq595EFLk9FM4pUdX 9CXWJOY8uKCGzdBmmhJrgO4k8c0TdX8NZrDjsU12ILI8eZDe11kppYZxxCEXDYTC h6aXY1kT/YFK4bgw76vY0A31E8zovXki99M5kLDaIWzbzLgvvmeGEkyK3G5etT2p tPsMw+K1nGdmrGiFUuTyYjA//GOxxJyJcdrCiRgzk8x1xz38Wggn1PNnvjYFyxli vxuJYOBbfl9aVNB1uLTvxti4K8PEQ70vhollWJkYw+jHH8xt/Y48ueker0MoWJBK W7ofp6qlIi64s1wmW3sBVa4SND90Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrleelgdeghecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhfhokffffgggjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsedvnhguqh hurggurhgrnhhtrdgtohhmqeenucggtffrrghtthgvrhhnpedtveeghedtjedvvedvleej ueevjeejtdellefgkeelfeeikeejlefgkedtudeuvdenucffohhmrghinhepvdhnughquh grughrrghnthdrtghomhenucfkphepledurddugedrvddvhedrledunecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnh htrhgruhhtsedvnhguqhhurggurhgrnhhtrdgtohhm X-ME-Proxy: Received: from april.pezone.net (p5b0ee15b.dip0.t-ipconnect.de [91.14.225.91]) by mail.messagingengine.com (Postfix) with ESMTPA id B8FF43280059; Sat, 15 Aug 2020 07:47:42 -0400 (EDT) Subject: Re: run pgindent on a regular basis / scripted manner To: Andres Freund , pgsql-hackers@postgresql.org References: <20200812223409.6di3y2qsnvynao7a@alap3.anarazel.de> From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <34b759cf-e2eb-2244-0d3b-9538b387b249@2ndquadrant.com> Date: Sat, 15 Aug 2020 13:47:41 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200812223409.6di3y2qsnvynao7a@alap3.anarazel.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-08-13 00:34, Andres Freund wrote: > I e.g. just re-indented patch 0001 of my GetSnapshotData() series and > most of the hunks were entirely unrelated. Despite the development > window for 14 having only relatively recently opened. Based on my > experience it tends to get worse over time. Do we have a sense of why poorly-indented code gets committed? I think some of the indentation rules are hard to follow manually. (pgperltidy is worse.) Also, since pgindent gets run eventually anyway, it's not really that important to get the indentation right the first time. I suspect the goal of most authors and committers is to write readable code rather than to divine the exact pgindent output. I think as a start, we could just issue a guidelines that all committed code should follow pgindent. That has never really been a guideline, so it's not surprising that it's not followed. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services