From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web12.10924.1577967426878145616 for ; Thu, 02 Jan 2020 04:17:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OvmbudSq; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1577967426; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6YQsThSgJw90onAVPwhCVOh47ShqLvy4N9n4DqXMgCo=; b=OvmbudSq6HwygdeiBJ2V/kdizCobyU9KYeOMeGwaqU66cEVbpZ0a4TcSzjMzsDupvBuI+5 FAXHa8bc2toesrgbKCX9a8lqhCyfIyizQzZcJ04mR87y429hGQ6JnpXsHfui+WpyC7HNs6 3w4M4MLLKEAdcLQzfJxdNzNED/ve7E4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-rYnEvh64NraE7xHrCX6Zeg-1; Thu, 02 Jan 2020 07:17:04 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 48AE018552A2; Thu, 2 Jan 2020 12:17:03 +0000 (UTC) Received: from x1w.redhat.com (ovpn-116-143.ams2.redhat.com [10.36.116.143]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 903C465E80; Thu, 2 Jan 2020 12:16:58 +0000 (UTC) From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= To: devel@edk2.groups.io Cc: Philippe Mathieu-Daude , Liming Gao , Jordan Justen , Yonghong Zhu , Zhichao Gao Subject: [PATCH v2] BaseTools/PatchCheck.py: Ignore CR and LF characters in subject length Date: Thu, 2 Jan 2020 13:16:56 +0100 Message-Id: <20200102121656.29572-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: rYnEvh64NraE7xHrCX6Zeg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D113 Strip the trailing characters before checking the subject line is less than 72 characters. Fixes: e61406708c83f Cc: Liming Gao Cc: Jordan Justen Reviewed-by: Jordan Justen Signed-off-by: Philippe Mathieu-Daude --- Cc: Yonghong Zhu Cc: Zhichao Gao 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 =20 - if count >=3D 1 and len(lines[0]) >=3D 72: + if count >=3D 1 and len(lines[0].rstrip()) >=3D 72: self.error('First line of commit message (subject line) ' + 'is too long.') =20 --=20 2.21.0