From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mx.groups.io with SMTP id smtpd.web11.21987.1681236341675169181 for ; Tue, 11 Apr 2023 11:05:41 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm1 header.b=OHBbxP17; spf=pass (domain: bsdio.com, ip: 66.111.4.25, mailfrom: rebecca@bsdio.com) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id D81285C01AD; Tue, 11 Apr 2023 14:05:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 11 Apr 2023 14:05:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1681236340; x=1681322740; bh=HzTj4IpVOQOUfp+FuiXykZBtsEsjkE1S+JC kXITKX+g=; b=OHBbxP17SsKIFijkjy0s8F3IuPVu6X8p0s5r3N6YiUmV5bCg4ll Y5Sxz4NTcfjMIz8zWUHHdEd3nrSJWH8qc362KwU78mkWmpiLkexB1+Uq4pnnH8MX f/QMCoR2PDqHSPanwuhgYi5UzFExpieuMPY7ugBUFdyAVOQ6h5Gxwvw4Le/Iy8eC Cwj/1KacjryHdjD3BuxaE+OD5PkNSLVX/zg+eRoa//v8BqqKJ4R7AeSMNqwoo/18 T3ebztj4VPxwvn+S9NLsZ69Fdj7xDVfgPMKHW3rPt7su9kTrkz0b3p+hqTE0EAV5 MhRcb5TxFycnfYmhzLmB/539shKArpAGVtw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1681236340; x= 1681322740; bh=HzTj4IpVOQOUfp+FuiXykZBtsEsjkE1S+JCkXITKX+g=; b=J mgrZ6rNyOuzufzJmMvSmgcHDkbreMo2ixmDtvIbnIYmA98sl5TROIKYFjnHCgUsr AF7tjIrEn5ygawUvumO2SZocBDntoQXPNDG6FjSSsudx+LPWYekb+X/iGwkQ85Mz xWJwPeO1/8OjiUVNA/de1Wn1EqEk59xnWoVL7dgF+8TBQFxTZz13gFb5IJY49M1v wH5ilYhGefHnSYoDw/f1r2ZdUipVi5r7fkx8Nofce7W/Pj147IKtUkRBXfZk+efI WkyTlGhsaiCVoB5iXx9AsSWTLHdAracS/baR+S4QK8pwPdvYgtCz3oxBcF5bB6/o lwEEXw8RlarjMU7M4SlCg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdekgedguddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeftvggs vggttggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtffrrg htthgvrhhnpefftdejieefffduveetleeftefgudekteevteeikefgieefhfehfeejfeel teehgfenucffohhmrghinhepvghnughsfihithhhrdhphienucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrvggsvggttggrsegsshguihhordgt ohhm X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Apr 2023 14:05:40 -0400 (EDT) Message-ID: <5fefe4eb-3038-7ff8-3361-085437600fff@bsdio.com> Date: Tue, 11 Apr 2023 12:05:39 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools: Update PatchCheck.py to check for __FUNCTION__ To: devel@edk2.groups.io, Liming Gao , Bob Feng , Yuwei Chen , Michael D Kinney References: <175382EDB7431FEF.3977@groups.io> From: "Rebecca Cran" In-Reply-To: <175382EDB7431FEF.3977@groups.io> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Could I get some reviews on this please? -- Rebecca Cran On 4/6/23 7:30 PM, Rebecca Cran wrote: > New code should use the C99 macro __func__ instead of the pre-Standard > macro __FUNCTION__. Update PatchCheck.py to reject patches with the > latter. > > Signed-off-by: Rebecca Cran > --- > BaseTools/Scripts/PatchCheck.py | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py > index 5d17d99a12ef..5f96b05dbcec 100755 > --- a/BaseTools/Scripts/PatchCheck.py > +++ b/BaseTools/Scripts/PatchCheck.py > @@ -491,6 +491,10 @@ class GitDiffCheck: > 'but DEBUG_' + mo.group(1) + > ' is now recommended', line) > > + if line.find('__FUNCTION__') != -1 and not self.filename.endswith('.py'): > + self.added_line_error('__FUNCTION__ was used, but __func__ ' > + 'is now recommended', line) > + > split_diff_re = re.compile(r''' > (?P > ^ diff \s+ --git \s+ a/.+ \s+ b/.+ $