public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2] BaseTools/PatchCheck.py: Ignore CR and LF characters in subject length
@ 2020-01-02 12:16 Philippe Mathieu-Daudé
  2020-01-09  5:35 ` [edk2-devel] " Bob Feng
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-02 12:16 UTC (permalink / raw)
  To: devel
  Cc: Philippe Mathieu-Daude, Liming Gao, Jordan Justen, Yonghong Zhu,
	Zhichao Gao

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>
Signed-off-by: Philippe Mathieu-Daude <philmd@redhat.com>
---
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Zhichao Gao <zhichao.gao@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


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

end of thread, other threads:[~2020-01-20 10:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-02 12:16 [PATCH v2] BaseTools/PatchCheck.py: Ignore CR and LF characters in subject length Philippe Mathieu-Daudé
2020-01-09  5:35 ` [edk2-devel] " Bob Feng
2020-01-20  9:11   ` Philippe Mathieu-Daudé
2020-01-20 10:27     ` Laszlo Ersek
2020-01-20 10:51       ` Philippe Mathieu-Daudé

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