Reviewed-by: Bob Feng <bob.c.f...@intel.com> -----Original Message----- From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Philippe Mathieu-Daudé Sent: Thursday, January 2, 2020 8:17 PM To: devel@edk2.groups.io Cc: Philippe Mathieu-Daude <phi...@redhat.com>; Gao, Liming <liming....@intel.com>; Justen, Jordan L <jordan.l.jus...@intel.com>; Zhu, Yonghong <yonghong....@intel.com>; Gao, Zhichao <zhichao....@intel.com> Subject: [edk2-devel] [PATCH v2] 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....@intel.com> Cc: Jordan Justen <jordan.l.jus...@intel.com> Reviewed-by: Jordan Justen <jordan.l.jus...@intel.com> Signed-off-by: Philippe Mathieu-Daude <phi...@redhat.com> --- Cc: Yonghong Zhu <yonghong....@intel.com> Cc: Zhichao Gao <zhichao....@intel.com> v2: Use rstrip() (Jordan Justen) v1: https://edk2.groups.io/g/devel/message/52425 --- BaseTools/Scripts/PatchCheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py index 2a4e6f603e79..9668025798da 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.') -- 2.21.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#53047): https://edk2.groups.io/g/devel/message/53047 Mute This Topic: https://groups.io/mt/69378760/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-