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 1u3dpA-0015fO-2C for pgsql-committers@arkaria.postgresql.org; Sat, 12 Apr 2025 16:35:20 +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 1u3dp8-006jeG-D5 for pgsql-committers@arkaria.postgresql.org; Sat, 12 Apr 2025 16:35:18 +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.94.2) (envelope-from ) id 1u3dp8-006je8-5r for pgsql-committers@lists.postgresql.org; Sat, 12 Apr 2025 16:35:18 +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 1u3dp6-004Ur2-2p for pgsql-committers@lists.postgresql.org; Sat, 12 Apr 2025 16:35:17 +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 53CGZFHO362184; Sat, 12 Apr 2025 12:35:15 -0400 From: Tom Lane To: Peter Geoghegan cc: pgsql-committers Subject: Re: clang-tidy complaints In-reply-to: References: Comments: In-reply-to Peter Geoghegan message dated "Sat, 12 Apr 2025 12:25:01 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <362182.1744475715.1@sss.pgh.pa.us> Date: Sat, 12 Apr 2025 12:35:15 -0400 Message-ID: <362183.1744475715@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Peter Geoghegan writes: > The first such complaint concerns a new mcxt.c function parameter that > shadows a global variable in the same file -- attached patch fixes > that by renaming the function parameter. Technically, this is a > distinct type of complaint to the clang-tidy complaints that I > ordinarily fix this time of year, though it's of the same general > nature. Isn't that obsolete in the wake of 55ef7abf8? I'd be inclined to leave it alone if no longer needed, because (to me anyway) "darea" reads worse than "area". > The second such complaint is a standard "function parameter name is > inconsistent" complaint, though it's one that affects vendored code in > src/include/snowball/libstemmer/header.h. I attach a fix for that, > too. In the past we have tended to treat cases with vendored code just > like non-vendored Postgres code, but there's always a question about > whether it's worth diverging from upstream. That needs to be decided > on a case-by-case basis, and I don't know enough to know if I should > proceed here. I don't want to diverge from upstream snowball here, because we do absorb new snowball versions every so often, so the problem would just come back. Maybe you could write to upstream and see if they'd accept the change? If they do, it'd be fine to apply locally. regards, tom lane