public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Re: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Allow tab in Makefile
       [not found] <171E6FA868D99F8D.19083@groups.io>
@ 2022-10-19  1:46 ` Bob Feng
  2022-10-20  9:28   ` 回复: " gaoliming
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Feng @ 2022-10-19  1:46 UTC (permalink / raw)
  To: devel@edk2.groups.io, Feng, Bob C; +Cc: Gao, Liming, Chen, Christine

Hi Liming, Christine,

Please help review this patch. 

This patch can unblock the CI test for the change of Makefile/GNUmakefile.
https://github.com/tianocore/edk2/pull/3436


Thanks,
Bob
-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng
Sent: Sunday, October 16, 2022 11:41 AM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Allow tab in Makefile

The syntax for Makefiles requires that indented lines s tart with a tab, but not a space.

This change of PatchCheck.py make the patch for Makefile/GNUmakefile pass the PatchCheck.py.

Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---
 BaseTools/Scripts/PatchCheck.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py index 63e6223f8ebc..475b3a8c27d9 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -383,6 +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':
+                    self.force_notabs = False
             elif len(line.rstrip()) != 0:
                 self.format_error("didn't find diff command")
             self.line_num += 1
--
2.37.0.windows.1







^ permalink raw reply	[flat|nested] 2+ messages in thread

* 回复: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Allow tab in Makefile
  2022-10-19  1:46 ` [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Allow tab in Makefile Bob Feng
@ 2022-10-20  9:28   ` gaoliming
  0 siblings, 0 replies; 2+ messages in thread
From: gaoliming @ 2022-10-20  9:28 UTC (permalink / raw)
  To: 'Feng, Bob C', devel; +Cc: 'Chen, Christine'

Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: Feng, Bob C <bob.c.feng@intel.com>
> 发送时间: 2022年10月19日 9:46
> 收件人: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>
> 抄送: Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine
> <yuwei.chen@intel.com>
> 主题: RE: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Allow
> tab in Makefile
> 
> Hi Liming, Christine,
> 
> Please help review this patch.
> 
> This patch can unblock the CI test for the change of Makefile/GNUmakefile.
> https://github.com/tianocore/edk2/pull/3436
> 
> 
> Thanks,
> Bob
> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Bob Feng
> Sent: Sunday, October 16, 2022 11:41 AM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming
> <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
> Subject: [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Allow
> tab in Makefile
> 
> The syntax for Makefiles requires that indented lines s tart with a tab,
but not
> a space.
> 
> This change of PatchCheck.py make the patch for Makefile/GNUmakefile pass
> the PatchCheck.py.
> 
> Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> ---
>  BaseTools/Scripts/PatchCheck.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/BaseTools/Scripts/PatchCheck.py
> b/BaseTools/Scripts/PatchCheck.py index 63e6223f8ebc..475b3a8c27d9
> 100755
> --- a/BaseTools/Scripts/PatchCheck.py
> +++ b/BaseTools/Scripts/PatchCheck.py
> @@ -383,6 +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':
> +                    self.force_notabs = False
>              elif len(line.rstrip()) != 0:
>                  self.format_error("didn't find diff command")
>              self.line_num += 1
> --
> 2.37.0.windows.1
> 
> 
> 
> 
> 




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-20  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <171E6FA868D99F8D.19083@groups.io>
2022-10-19  1:46 ` [edk2-devel] [PATCH 1/1] BaseTools/Scripts/PatchCheck.py: Allow tab in Makefile Bob Feng
2022-10-20  9:28   ` 回复: " gaoliming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox