From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.81]) by mx.groups.io with SMTP id smtpd.web09.10382.1577963731492455226 for ; Thu, 02 Jan 2020 03:15:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VwfcKEey; spf=pass (domain: redhat.com, ip: 207.211.31.81, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1577963730; 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: in-reply-to:in-reply-to:references:references; bh=oolzd25nEmR49ZSTg3njhGdVAt65gLXg1Eiwa/KV6BA=; b=VwfcKEeyT50+K9EO5QywH8xZiVJRmligALvB9UBOq+5sd48abb7jkf0JWHmKcQJhr/iv3T yjbbIZLEJQMWnLOstZ+bi5OpmzUAP1XQH376F4mgYgKD3ufJ8hP+jhTb532vTsOZed5oLl 2WlgsuZw8T4ZuCqk6NBCXi4nSZ169Io= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-337-ybMvitoEO--9a1tO5EaHzg-1; Thu, 02 Jan 2020 06:15:28 -0500 Received: by mail-ed1-f70.google.com with SMTP id w3so1756313edt.23 for ; Thu, 02 Jan 2020 03:15:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=PpQsEWW7TN/dsTuD3bQjlVw9uKJzNPwTPY34XZ7XN0A=; b=b1TTvt9khNVYTTCYDdml7DxYEO9eLIHQgEY2n1JGQXLROMPe+xA9gwSYq0IQipsTGm WGfVKR63TaImaTIzQR4y+I8pVnW/9PH0XeuV1UlvkEFphWQP3DaC2oba2MvNuwMAyQNt LnlwpqaIQMV0/IRJ4AjzK+rWyvVQ8ci5S2Rk6TIn49XY6d4mCc5DGGjCJWRgphIWEnhJ mlX9jvrRTT6MpOhD3iK5ib3nY/2o9SjldQjaEf9ltMQEX1lYFxNIfmf6l5JuvOyDCjRi 5/PMGXhI/yNeH3uOEYifzhymYuc/6a9cQHMsg/Nn3Djiur+hPUr8vfVzUIuxQ2owLGTO PRVA== X-Gm-Message-State: APjAAAXCfYZSbr3oeOcy9T0HT3B6s9IgjF94YoxuETeRPRrFTEaJttTp 7zD1MfLJ11cmZy66/B4ymWUL9IbpuPIBLWzNscQrrHQpYBdlZ6+YsyfQjCbK6hG3A9HnbN6R0TV CWmXRIXPaGJO5+w== X-Received: by 2002:a17:906:1690:: with SMTP id s16mr86046945ejd.14.1577963726256; Thu, 02 Jan 2020 03:15:26 -0800 (PST) X-Google-Smtp-Source: APXvYqxi5NSUCjJxGpzhr5PCNeRkn7BxR9U5u2uZGi59H1DTgcuTLAh1YqSR+3FbBaTzXceh+adrqw== X-Received: by 2002:a17:906:1690:: with SMTP id s16mr86046920ejd.14.1577963726021; Thu, 02 Jan 2020 03:15:26 -0800 (PST) Return-Path: Received: from [192.168.1.35] (34.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.34]) by smtp.gmail.com with ESMTPSA id mh16sm7388076ejb.46.2020.01.02.03.15.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jan 2020 03:15:25 -0800 (PST) Subject: Re: [edk2-devel] [PATCH 1/1] BaseTools/PatchCheck.py: Ignore CR and LF characters in subject length To: Jordan Justen , devel@edk2.groups.io Cc: Liming Gao , Yonghong Zhu , Zhichao Gao References: <20191219141256.25752-1-philmd@redhat.com> <157795799839.2404955.6192927022904181653@jljusten-skl> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: <450eedae-34ad-0fef-2847-c047476b3da0@redhat.com> Date: Thu, 2 Jan 2020 12:18:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <157795799839.2404955.6192927022904181653@jljusten-skl> X-MC-Unique: ybMvitoEO--9a1tO5EaHzg-1 X-Mimecast-Spam-Score: 0 Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 1/2/20 10:39 AM, Jordan Justen wrote: > On 2019-12-19 06:12:56, Philippe Mathieu-Daud=C3=A9 wrote: >> 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 >> Signed-off-by: Philippe Mathieu-Daude >> --- >> Cc: Yonghong Zhu >> Cc: Zhichao Gao >> --- >> BaseTools/Scripts/PatchCheck.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchC= heck.py >> index 2a4e6f603e79..b72e71963ea8 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].strip()) >=3D 72: >=20 > I think we should use rstrip rather than strip. I tried to test this > with rstrip instead, by updating the commit message to have several > whitespace characters at the beginning. >=20 > Unfortunately, I think subject_prefix_re is eating more spaces at the > start of the line than it ought to. Oh I haven't thought of that. > The leading whitespace issue is probably a problem for another day, so > if you change it to rstrip, then: >=20 > Reviewed-by: Jordan Justen OK, thanks Jordan! >> self.error('First line of commit message (subject line) '= + >> 'is too long.') >> =20 >> --=20 >> 2.21.0 >> >> >>=20 >> >=20