summaryrefslogtreecommitdiffstats
path: root/BaseTools/Scripts
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daud? <philmd@redhat.com>2020-01-02 20:16:56 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-01-09 06:09:33 +0000
commit2649a735b249e54a4ddd7bd2b8d62bfe77e8d6da (patch)
treee736533d8c487241b45bf665e1b02a572610d372 /BaseTools/Scripts
parent972d88726410e21b1fff1a528854202c67e97ef1 (diff)
downloadedk2-2649a735b249e54a4ddd7bd2b8d62bfe77e8d6da.tar.gz
edk2-2649a735b249e54a4ddd7bd2b8d62bfe77e8d6da.tar.bz2
edk2-2649a735b249e54a4ddd7bd2b8d62bfe77e8d6da.zip
BaseTools/PatchCheck.py: Ignore CR and LF characters in subject length
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=113 Strip the trailing characters before checking the subject line is less than 72 characters. Fixes: e61406708c83f Cc: Liming Gao <liming.gao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
Diffstat (limited to 'BaseTools/Scripts')
-rwxr-xr-xBaseTools/Scripts/PatchCheck.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py
index 2a4e6f603e..9668025798 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -196,7 +196,7 @@ class CommitMessageCheck:
self.error('Empty commit message!')
return
- if count >= 1 and len(lines[0]) >= 72:
+ if count >= 1 and len(lines[0].rstrip()) >= 72:
self.error('First line of commit message (subject line) ' +
'is too long.')