From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mx.groups.io with SMTP id smtpd.web10.8502.1679691414310386369 for ; Fri, 24 Mar 2023 13:56:54 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm3 header.b=IPGRtRup; spf=pass (domain: bsdio.com, ip: 64.147.123.25, mailfrom: rebecca@bsdio.com) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 5F34B320094C; Fri, 24 Mar 2023 16:56:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 24 Mar 2023 16:56:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :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:reply-to:sender:subject:subject:to:to; s= fm3; t=1679691412; x=1679777812; bh=Ncig3CPGGJxBC4nKo+f5pImuqduP QYlrOJJgAt+z9I8=; b=IPGRtRupY3PSqXvjknIE87DCLFmmnColcZTi3+Adrop2 j+XyLccs4ZM+tcLCZnpEE/gloY9q/H/WcRbY5XT6k6DHDHxDS2pOwhY61yj8JbH6 PQ4TIkkvY9/g063SguDu1+tJkpOBaXpqcovdQ7mP//0RrCqJJImU6wH6tnsARGvJ 3o7FQGAWQ1uOXni530fuwLALCuagRmFs1NTZaOAelSZph5857k5sieEwoHUelZcn Oiu5DPXTWs+7ppxH8ottQWEbuosIIdQi5sggRo4pkUym7AgzNlxvGoblmAM/J1Xn /9IYOgcTfhSNbrGmbaJWMtu6V47M0EbpNEFxm1outQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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: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=1679691412; x=1679777812; bh=Ncig3CPGGJxBC4nKo+f5pImuqduP QYlrOJJgAt+z9I8=; b=GHeDGvpajCPsN89Hq4TX8qhG6gNkl/0wB3kKsAp8NNU2 eiyocuTdpasUA91gx5kYQOzJfRJ8PSDXQbeO601iAlGdv77PN4Aa10DGRr/kQP/z yGvmtTUpDmLhUpZXnz6EgMvqpq9J5oBbRFkkDJcbh69zMWtm0CzUTiuqgQKvZDb8 eEvFtwEPTYeWZPcSR+j50IgGBcF0lytcs++zFRareqqgvBJtWUry8Dk/2X9XjNn1 5D5C8G7Em2YDENvJxbSMspUuggaq37P0MeajgiBCO6hswVBGHYgnrfAb6a/sImDZ crs6LQMBI9JMVRlDLoqCIujyVMSlqlVXvLRlA+G9Lg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegiedgudeggecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuhffvvehrfhgjtgfgsehtkeertddtfeejnecuhfhrohhmpeft vggsvggttggrucevrhgrnhcuoehrvggsvggttggrsegsshguihhordgtohhmqeenucggtf frrghtthgvrhhnpedtkefggeduleetgeffjeejteeftdekueelhfegueekffetheejueel udeihfeugeenucffohhmrghinhepghhrohhuphhsrdhiohenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrvggsvggttggrsegsshguihhordgt ohhm X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 24 Mar 2023 16:56:52 -0400 (EDT) Message-ID: <5ec2b49b-c6a7-df8e-66fe-900598422c1d@bsdio.com> Date: Fri, 24 Mar 2023 14:56:51 -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.0 Subject: Re: [edk2-devel] [PATCH v6 02/12] BaseTools/PatchCheck.py: Add PCCTS to tab exemption list From: "Rebecca Cran" To: devel@edk2.groups.io, mikuback@linux.microsoft.com Cc: Bob Feng , Liming Gao , Michael D Kinney , Sean Brogan , Yuwei Chen Reply-To: devel@edk2.groups.io, rebecca@bsdio.com References: <20230324204838.1485-1-mikuback@linux.microsoft.com> <20230324204838.1485-3-mikuback@linux.microsoft.com> <174F7634AC74F535.7603@groups.io> In-Reply-To: <174F7634AC74F535.7603@groups.io> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Ah, but my patch was only for Makefiles: I didn't realize source files also contain tabs. So we probably want a combination of our patches: yours to ignore the entire directory, and the change I made to also ignore files named "makefile" as well as "Makefile". Could you update your patch with my "os.path.basename(self.filename).lower() == 'makefile' " change please? -- Rebecca Cran On 3/24/23 2:52 PM, Rebecca Cran wrote: > I sent out a patch to fix this same issue earlier today! > > I took a slightly different approach: see "[edk2-devel] [PATCH v2 1/1] > BaseTools/Scripts/PatchCheck.py: Improve check for Makefiles" > > > diff --git a/BaseTools/Scripts/PatchCheck.py > b/BaseTools/Scripts/PatchCheck.py > index fcdabfc8acea..241467f10ea5 100755 > --- a/BaseTools/Scripts/PatchCheck.py > +++ b/BaseTools/Scripts/PatchCheck.py > @@ -383,7 +383,8 @@ class GitDiffCheck: >                      self.force_crlf = False >                      self.force_notabs = False >                  if os.path.basename(self.filename) == 'GNUmakefile' or \ > -                   os.path.basename(self.filename) == 'Makefile': > +                   os.path.basename(self.filename).lower() == > 'makefile' or \ > +                   os.path.splitext(self.filename)[1] == ".makefile": >                      self.force_notabs = False >              elif len(line.rstrip()) != 0: >                  self.format_error("didn't find diff command") > > > On 3/24/23 2:48 PM, Michael Kubacki wrote: >> From: Michael Kubacki >> >> Purdue Compiler Construction Tool Set (PCCTS) source code was copied/ >> pasted into BaseTools/Source/C/VfrCompile/Pccts/. >> >> The code contains tab characters instead of spaces. >> >> PatchCheck.py gives an error on modifications to files that >> contain tabs. >> >> This change adds that directory to the pre-existing list of >> directories in which tab checks are ignored in PatchCheck.py. >> >> The goal of my upcoming change there is not to mix tabs and spaces >> but to fix a bug while preserving its current formatting characters. >> >> Cc: Bob Feng >> Cc: Liming Gao >> Cc: Michael D Kinney >> Cc: Sean Brogan >> Cc: Yuwei Chen >> Signed-off-by: Michael Kubacki >> Reviewed-by: Liming Gao >> Reviewed-by: Michael D Kinney >> --- >>   BaseTools/Scripts/PatchCheck.py | 4 +++- >>   1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/BaseTools/Scripts/PatchCheck.py >> b/BaseTools/Scripts/PatchCheck.py >> index fcdabfc8acea..84d56b8c8b70 100755 >> --- a/BaseTools/Scripts/PatchCheck.py >> +++ b/BaseTools/Scripts/PatchCheck.py >> @@ -383,7 +383,9 @@ class GitDiffCheck: >>                       self.force_crlf = False >>                       self.force_notabs = False >>                   if os.path.basename(self.filename) == 'GNUmakefile' >> or \ >> -                   os.path.basename(self.filename) == 'Makefile': >> +                   os.path.basename(self.filename) == 'Makefile' or \ >> +                   self.filename.startswith( >> + 'BaseTools/Source/C/VfrCompile/Pccts/'): >>                       self.force_notabs = False >>               elif len(line.rstrip()) != 0: >>                   self.format_error("didn't find diff command") > > > > >