From 913a308df934952bcbedacb6baa8bd023a25b978 Mon Sep 17 00:00:00 2001 From: Bob Feng Date: Sun, 16 Oct 2022 11:41:05 +0800 Subject: [PATCH] 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 Cc: Liming Gao Cc: Yuwei Chen Reviewed-by: Liming Gao --- BaseTools/Scripts/PatchCheck.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py index 63e6223f8e..475b3a8c27 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