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 1jNX0v-0004oE-WE for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Apr 2020 07:26:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jNX0u-0007rx-09 for pgsql-hackers@arkaria.postgresql.org; Sun, 12 Apr 2020 07:26:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jNX0t-0007rq-I0 for pgsql-hackers@lists.postgresql.org; Sun, 12 Apr 2020 07:26:43 +0000 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jNX0o-0007YQ-HR for pgsql-hackers@postgresql.org; Sun, 12 Apr 2020 07:26:40 +0000 Received: by mail-pj1-x1044.google.com with SMTP id e16so2297427pjp.1 for ; Sun, 12 Apr 2020 00:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sqjrA30mKsHzYL1IV88rZhG6H2Js9Uw1CQJ47RoOapk=; b=NidQGMnkJA+nMtYO7vwsWGRNL/p+H7qVSSJX9yjJc3XCCN8EKuQSpIS9n/ELSGxc92 B+lK1qAGQiFk0yKVfwa03XE8fjUDKeEN1/FXPfBOxoEygEOnDz5IUL3f5lJ9IwMlCQzI k5adCeA/nx7HwV4xQNhNiwHR4pJXhNL8gVA8M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=sqjrA30mKsHzYL1IV88rZhG6H2Js9Uw1CQJ47RoOapk=; b=Lnlj3yFGDSUU/ad2OUpR4IB3u+9n0FVvHV2Rot1+sZIgQLN24Sm7KAqDRa7GXVzaOw DXXu6S3cA5jftK4lQCyCr3iDDr8MFcQ7YokUI7ZmaJNfk6MpcEkWGtxcsIqENG88BT6t 0QvDeSoQU0fjKoeUdfWgd9GWIdkAkrEeE7jTq8tVo1UA9LmDHfO2pDaodlDzQ31KOVcf IrR5tfiizPT2455fIs/FWNjpwpUSYIY4W5fH0GXYhNeQ8orPhyYHS9MxT4JjLzk7grgL tBD4FqIX1EIduu+XhrFg4HYbvW6Fi19EgZiU+hx1sIef6WhL00805vBxsiYWcOUQtTY+ cjww== X-Gm-Message-State: AGi0PuaoxMM4wWC7y5jaKbT9jCLEvfawnSzGqXN7NvEWsQ6rAa2AMsEM o7SfY9IwpsIYHFqsEdDvBF4dAw== X-Google-Smtp-Source: APiQypK/JQaFbB/ptrprg2J8HnqgKxp3/3b2LfcwBOb5e1H6d00PmoQy4b0aGr+KWmq2jLee0g+4yg== X-Received: by 2002:a17:90a:7409:: with SMTP id a9mr14150360pjg.94.1586676395462; Sun, 12 Apr 2020 00:26:35 -0700 (PDT) Received: from rfd.leadboat.com (108-233-125-46.lightspeed.sntcca.sbcglobal.net. [108.233.125.46]) by smtp.gmail.com with ESMTPSA id d7sm5664571pfa.106.2020.04.12.00.26.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Apr 2020 00:26:34 -0700 (PDT) Date: Sun, 12 Apr 2020 00:26:32 -0700 From: Noah Misch To: Tom Lane Cc: Andrew Dunstan , PostgreSQL-development Subject: Re: cleaning perl code Message-ID: <20200412072632.GA623763@rfd.leadboat.com> References: <20200411043014.GA590991@rfd.leadboat.com> <27481.1586618092@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27481.1586618092@sss.pgh.pa.us> User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Sat, Apr 11, 2020 at 11:14:52AM -0400, Tom Lane wrote: > Noah Misch writes: > > In summary, among those warnings, I see non-negative value in "Code before > > warnings are enabled" only. While we're changing this, I propose removing > > Subroutines::RequireFinalReturn. > > If it's possible to turn off just that warning, then +several. We'd not get that warning if src/tools/perlcheck/pgperlcritic stopped enabling it by name, so it is possible to turn off by removing lines from that config. > It's routinely caused buildfarm failures, yet I can detect exactly > no value in it. If there were sufficient cross-procedural analysis > backing it to detect whether any caller examines the subroutine's > result value, then it'd be worth having. But there isn't, so those > extra returns are just pedantic verbosity. Agreed.