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.94.2) (envelope-from ) id 1uScEZ-00AMFF-Uj for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jun 2025 13:56:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uScEX-001jZ1-Fj for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Jun 2025 13:56:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uScEX-001jYt-6F for pgsql-hackers@lists.postgresql.org; Fri, 20 Jun 2025 13:56:45 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uScEV-0038MK-1g for pgsql-hackers@lists.postgresql.org; Fri, 20 Jun 2025 13:56:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2025010100; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=pjnLxl+xhmmlGflbc0HEWOHNU/mpcB1Yt1WIFmmdrsY=; b=leMBt fEw0cobaRdlDMWKWBNmeOEt4NZYsJPJLtTXF0Tm2msU/d6xMnllZ7Psj6DiLc67EUAiuwM/MZve2N 9j08oPGakcI9UqoghUt+ftKBPWMlpYyhxc4z4NSiUUZwCHYqdKe/qRii/XmO2U7sArlm4SUBsgtM2 Fz9m6ftaK/Cn/4gABt75Sj5MXZlEiTTd6eFurvQCWb2JRIZu2jDWyLkLgW7qBW8lRDpmNVNhU/e+Z 7ZlGBZC3+1Y0qQwpVDM0ajAzRJphBq+ZQcOfuJ35AxWOQc/OyszoWAbjRmFG5iAGRoqVvbGSPNmyj PXLNtqHbJWBNfMzo1ho3emB8ZCIJw==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1uScET-008r6z-21; Fri, 20 Jun 2025 09:56:41 -0400 Date: Fri, 20 Jun 2025 09:56:41 -0400 From: Bruce Momjian To: Aleksander Alekseev Cc: PostgreSQL Hackers , Arseniy Mukhin , Michael Paquier Subject: Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jun 20, 2025 at 04:44:08PM +0300, Aleksander Alekseev wrote: > Hi Arseniy, > > > I tried it with the whole project and almost always it works great. > > But I noticed two cases where it works probably not as expected: > > > > 1) comments which don't have a star on each line. For example: > > file 'cube.c' > > > > before: > > /* make up a metric in which one box will be 'lower' than the other > > -- this can be useful for sorting and to determine uniqueness */ > > > > after: > > /* > > * make up a metric in which one box will be 'lower' than the other > > -- this can be useful for sorting and to determine uniqueness */ > > > > 2) comments where closing */ is on the last comment line. For example: > > file 'crypt-blowfish.c' > > > > before: > > /* This has to be bug-compatible with the original implementation, so > > * only encode 23 of the 24 bytes. :-) */ > > > > after: > > /* > > * This has to be bug-compatible with the original implementation, so > > * only encode 23 of the 24 bytes. :-) */ > > Thanks for the review. You are right, these comments shouldn't be affected. > > It's going to be simpler to modify pgindent then. PFA the updated patch. Given the quality of BSD indent code, I have _always_ found it easier to modify pgindent. ;- -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.