From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mx.groups.io with SMTP id smtpd.web11.175089.1680831043073714647 for ; Thu, 06 Apr 2023 18:30:43 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm3 header.b=HSWusP7i; spf=pass (domain: bsdio.com, ip: 64.147.123.19, mailfrom: rebecca@bsdio.com) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 440CE320094B; Thu, 6 Apr 2023 21:30:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 06 Apr 2023 21:30:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm3; t=1680831041; x=1680917441; bh=UFx+PTM6C5 z8pOUZdlbP9q7CiOqow7Ubk3hz4RZDYaY=; b=HSWusP7i3kwILZ7j/I/t9mChrN wdm+Y4szNZwcmtprPGDpK0B4y8NreQp9O/rlUwd6echbVvcP/FaAw4H6BtSOa8cT oqngxF/j0DUH3pxltXQ5Z80VBD8bS49jPM67LM5n78Nwfi6LS8mLhp7AOQCRxthV SIGThM8C1JGG6PTIbzR1dM8nsxLAwd9WLvtHRAF7FXAx+v3vNyU1GtStEqg+/rS+ bnxmYxnBh2Qx8/Q33ke1mqp0Ysf+jCPpxEKKoPp8QqIvXdwk3j/aWhGnwCegIhRq oNI5Y7uRnihNfTmCN4Yk12eKeGwMDTDthYe08y+wCHmw0RjOFPVTjtE5BGkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1680831041; x=1680917441; bh=UFx+PTM6C5z8p OUZdlbP9q7CiOqow7Ubk3hz4RZDYaY=; b=dtmeOy95Gn+kX4P6igLwUWq93DdHr KiWqNOK4tpyibKmKC5ip5kRUKRheHz9UQRsuWfJJB38GBexeHjal82pLaqz7nYzb E7CB1HL46pI7E7NLjZAgyN0wJG7xOFLXLPapFnLqvXDaoV0LSEBQYGAEBsfGztkR oTU3GyZaDFBKH/ivNbDYo8I2eTZ1MeYUh6tjTsGQ8LnN2GqTt7HFeVr6Idnw7F2M Lh3DqFUyjNVA/7UXSdVHhzu9p2sTWbe5uk4MjGMA5F5Jw7cfcyL8IAVMxL7ipjwF efkOCZgns6dAY4IrIYdolvWi1XzblrPCzlfIsibCqLGA7g4qNU7h7+rDQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedggeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomheptfgvsggvtggt rgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrthhtvg hrnhepgfdtjeegjeeuteeugeegtdetgffftdeggefhleelfffhgefhteelheekhfdvgedt necuffhomhgrihhnpegvnhgushifihhthhdrphihnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheprhgvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 21:30:40 -0400 (EDT) From: "Rebecca Cran" To: devel@edk2.groups.io, Liming Gao , Bob Feng , Yuwei Chen Cc: Rebecca Cran Subject: [PATCH 1/1] BaseTools: Update PatchCheck.py to check for __FUNCTION__ Date: Thu, 6 Apr 2023 19:30:35 -0600 Message-Id: <20230407013035.2285144-1-rebecca@bsdio.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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/.+ $ -- 2.34.1