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 1spvwa-005aUT-Nc for pgsql-committers@arkaria.postgresql.org; Sun, 15 Sep 2024 20:34:05 +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 1spvwY-005lXn-Vj for pgsql-committers@arkaria.postgresql.org; Sun, 15 Sep 2024 20:34:02 +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 1spvwY-005lXf-Ah for pgsql-committers@lists.postgresql.org; Sun, 15 Sep 2024 20:34:02 +0000 Received: from mail-qv1-xf33.google.com ([2607:f8b0:4864:20::f33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1spvwQ-001KxU-2p for pgsql-committers@lists.postgresql.org; Sun, 15 Sep 2024 20:33:59 +0000 Received: by mail-qv1-xf33.google.com with SMTP id 6a1803df08f44-6c524b4f8b9so31172416d6.3 for ; Sun, 15 Sep 2024 13:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1726432432; x=1727037232; darn=lists.postgresql.org; h=in-reply-to:autocrypt:content-language:from:references:cc:to :subject:user-agent:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to; bh=LarSvgEcH9n4OMoRy6/7Ydux04QPRbSTvFd+4mtGx6w=; b=I/aHRFvPRiZrU7CHrnzb9YqQn5C66tRn7mVWakIWb6WL9aiHW1gul9WE7HYtjb6PLw twB3fvUk5Le08hCCliOqspTbo5SWDiflBugw5uKFF7OCi+wYCN86iF+DgKUeWs6U0c5Y 4ofTmzmu0Dj2nA9NYV+X7bFVv08V1Fjn/C/waNNkZDf8pwAZ0IrLVLH7sOlxEQMC+1Px HhwpEO+1MMWvLvdtTmmHRSM2ZiDcgdrvOyFUkU8ePHn0aXzxQwoiEox2Iv6NVtLq1Zu/ CbmFEbR/uOGwoJYBXKZSrDsDll4gGarndlnlgwReQW3DsOyEr3yl0x2wBepqDAoYQApN njQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726432432; x=1727037232; h=in-reply-to:autocrypt:content-language:from:references:cc:to :subject:user-agent:mime-version:date:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=LarSvgEcH9n4OMoRy6/7Ydux04QPRbSTvFd+4mtGx6w=; b=LZO1md5yYTSjpmcMWOe/xp7ZSR+8dBVZD71YHxec4+f5Km6tuJ7Lvo4oHzJwI6SuaV LvuUDepQgqqYiNgXQmDxqpXv0P8OEMbaEnw9DOcr+2bIcJsajaAFj6N8q2AUUEghbT4H yt2TjNMyhyx/AihBcQBYA/S0IhjLE0T3tWtxaOmTkZT5vw98ahYUFu3EdCBpJIhW7Dck In41MzDGCBzJvle6woc60onTPRX+UMWrfU35ktA24NPrypd97gX+SlAFJIYqhp6lLijg CvSvJ41m9Q1H3YrCQzXh5g/KFb3XHnuVjzYMfP82A/rKMwXy0MqNazgmIcilIMtMKC2x D3ow== X-Gm-Message-State: AOJu0YztaMYLUFQMNT+WXr443O7azobSTycfVaLFis8iCTZhA2ZWYyeh FrkMMsJ6JM2aiXhzjwykjvdFUTPG7zSnoQXTckc9F6C4/19TYNmrjCP0T7wHa0I= X-Google-Smtp-Source: AGHT+IE4BHFnUZWfNB4ufuwk8v+zW3vUaXoJ6Ocrkyht0lEiiizMXep97dva9D1L0ab4il1njxgDHQ== X-Received: by 2002:a05:6214:2d49:b0:6c1:6a2e:afc6 with SMTP id 6a1803df08f44-6c57df2106bmr143988326d6.15.1726432432281; Sun, 15 Sep 2024 13:33:52 -0700 (PDT) Received: from ?IPV6:2605:a601:9180:9800::2bb? ([2605:a601:9180:9800::2bb]) by smtp.googlemail.com with ESMTPSA id 6a1803df08f44-6c58c691e93sm18201056d6.91.2024.09.15.13.33.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Sep 2024 13:33:51 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------4uJb03451GpcpGg5YzxcBZeK" Message-ID: Date: Sun, 15 Sep 2024 16:33:49 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pgsql: Perl scripts: eliminate "Useless interpolation" warnings To: Bruce Momjian Cc: pgsql-committers@lists.postgresql.org References: <66b5b1d6-3f2a-4944-91a3-7e40a565ccac@dunslane.net> From: Andrew Dunstan Content-Language: en-US Autocrypt: addr=andrew@dunslane.net; keydata= xsBNBE7KWFkBCAClridxur2AIc7eW2AR7izbfp3EnNefie2HbLF0izW5Ik5UjX2HBXBx4syI gY6b0ugohXrr274+baoAlvSbq6cAoQuEVrk5IZFzt20b1Xkx65FwGSEj526yiKLocqkJceSq Xr9xcA5SGY+FZv441chh5SU92v4q6z+6LPpoHOh97ptAVXZYNTtU0LevyvD5lja0TzbvJm6C eFXitJfnm1pLEr0DGJCR/iUOl/N62Kh4855zZC7NHIjQHPOvV5Stz/l5ilDhvGVk+xkXFPys SjZoUr1rXhYLpiyi5sR0X9FHXT0KnGuz1F5ERO7ZTLSSQ6fJwPj6gOk9K+vvoKvoeql5ABEB AAHNJEFuZHJldyBEdW5zdGFuIDxhbmRyZXdAZHVuc2xhbmUubmV0PsLAmwQTAQgARQIbAwIX gAIZAQULCQgHAgMiAgEGFQoJCAsCBBYCAwECHgcWIQTkPlhGHfx8v0RpFaWZ+n/LWfw7gQUC ZFlxxwUJGVGAbgAKCRCZ+n/LWfw7gXikB/9ZdcUy6CTBFIIuL/bVsc1eLEW/gJBjJBF6HxNY xgEkAgXAp4Lg4A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zj5yOBi+FlmV1Hw 49QYe1sn2ZPs In-Reply-To: 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. --------------4uJb03451GpcpGg5YzxcBZeK Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2024-09-15 Su 4:16 PM, Bruce Momjian wrote: > On Sun, Sep 15, 2024 at 02:30:47PM -0400, Andrew Dunstan wrote: >> >> On 2024-09-15 Su 10:56 AM, Bruce Momjian wrote: >> >> Perl scripts: eliminate "Useless interpolation" warnings >> >> Eliminate warnings of Perl Critic from src/tools. >> >> Backpatch-through: master >> >> >> >> I don't understand this commit. The buildfarm members crake and koel regularly >> run the perl critic checks and have not complained. See for example from before >> this change:> koel&dt=2024-09-15%2003%3A34%3A02&stg=perl-check> >> >> The change doesn't seem to have had any discussion either. This particular >> warning is surely a very low level (i.e. fairly unimportant) one, of the type >> we normally ignore. If some version of perlcritic has raised it to severity 5 >> then the correct action IMNSHO would be to add an exception for it to the >> perlcriticrc, like we do for ProhibitLeadingZeros. If not, then perhaps you can >> explain how you got the warnings. > So, the warning is about the use of double-quotes when single-quotes > will work just fine. I wrote a new script and changed it to single > quotes, so for consistency, I looked at other Perl scripts that might > have the issue. The message I got was: > > /root/add_commit_links.pl: Useless interpolation of literal string at line 51 near 'my $tmpfile = $file . ".tmp";'. (Severity: 1) > > My $HOME/.perlcritic has: > > severity = 1 > > and that is why I saw it. Is it a bad change? I understand perfectly what the warning is about. But the project's perlcritic policy is expressed at src/tools/perlcheck/perlcriticrc. It's basically severity 5 plus some additions and one exception. We shouldn't be imposing our personal perlcritic policies on the project. The change isn't bad in itself, but there shouldn't be any expectation that we will keep to this policy, as it's not required by project policy. There is a huge mass of perlcritic issues in our perl code at severity 1 (over 13000 by my count). If we're going to clean them up (which I would oppose) we should do it in a systematic way. It's hard to see why this one is special. cheers andrew -- Andrew Dunstan EDB:https://www.enterprisedb.com --------------4uJb03451GpcpGg5YzxcBZeK Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit


On 2024-09-15 Su 4:16 PM, Bruce Momjian wrote:
On Sun, Sep 15, 2024 at 02:30:47PM -0400, Andrew Dunstan wrote:

On 2024-09-15 Su 10:56 AM, Bruce Momjian wrote:

    Perl scripts:  eliminate "Useless interpolation" warnings

    Eliminate warnings of Perl Critic from src/tools.

    Backpatch-through: master



I don't understand this commit. The buildfarm members crake and koel regularly
run the perl critic checks and have not complained. See for example from before
this change: <https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=
koel&dt=2024-09-15%2003%3A34%3A02&stg=perl-check>

The change doesn't seem to have had any discussion either. This particular
warning is surely a very low level (i.e. fairly unimportant) one, of the type
we normally ignore. If some version of perlcritic has raised it to severity 5
then the correct action IMNSHO would be to add an exception for it to the
perlcriticrc, like we do for ProhibitLeadingZeros. If not, then perhaps you can
explain how you got the warnings.
So, the warning is about the use of double-quotes when single-quotes
will work just fine.  I wrote a new script and changed it to single
quotes, so for consistency, I looked at other Perl scripts that might
have the issue.  The message I got was:

   /root/add_commit_links.pl: Useless interpolation of literal string at line 51 near 'my $tmpfile = $file . ".tmp";'.  (Severity: 1)

My $HOME/.perlcritic has:

	severity = 1

and that is why I saw it.  Is it a bad change?


I understand perfectly what the warning is about.

But the project's perlcritic policy is expressed at src/tools/perlcheck/perlcriticrc. It's basically severity 5 plus some additions and one exception. We shouldn't be imposing our personal perlcritic policies on the project.

The change isn't bad in itself, but there shouldn't be any expectation that we will keep to this policy, as it's not required by project policy.

There is a huge mass of perlcritic issues in our perl code at severity 1 (over 13000 by my count). If we're going to clean them up (which I would oppose) we should do it in a systematic way. It's hard to see why this one is special.

cheers

andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com
--------------4uJb03451GpcpGg5YzxcBZeK--