Reviewed-by: Bob Feng <[email protected]> -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Philippe Mathieu-Daudé Sent: Thursday, January 2, 2020 8:17 PM To: [email protected] Cc: Philippe Mathieu-Daude <[email protected]>; Gao, Liming <[email protected]>; Justen, Jordan L <[email protected]>; Zhu, Yonghong <[email protected]>; Gao, Zhichao <[email protected]> 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 <[email protected]> Cc: Jordan Justen <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Signed-off-by: Philippe Mathieu-Daude <[email protected]> --- Cc: Yonghong Zhu <[email protected]> Cc: Zhichao Gao <[email protected]> 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: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
