From nobody Mon Feb 9 21:24:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+68850+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68850+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1608019722; cv=none; d=zohomail.com; s=zohoarc; b=QgDyKinYLCuOh93YuCgrkfHepVNrRzfp2uhVbaDPIGnClKqCo3hgMMGqZ9S8yS5K/F6MWsAIE4DXNItPQbMnqhSO7beflBEFX17HjdYSLOydfQtE+WPsJM6+kM2BevX+MEiOZsNYdzzJX4AUYT7OH9PzwKXT1xKpb5S2ujx1L5M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608019722; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=oIepxIUobzs4e04BjMqTF4cHvSiWJ/ANHA+T/+kPvN0=; b=IvRLlyBxYYqdAo1tUbPr2WSX685wuNSZi8XUr2Fdtgv11aCIHPtLWGxblI129RXJMz9rrgdVRJnEnRINkNOh39+21CfAU6H1MQr9PtXxj5eCXR/iiuSjANb43Uuahbf2HxJLtzq+DrfaziDT4ragtIRL3hPhKxnsga3Y37rmTJw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+68850+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1608019722505859.4424927118879; Tue, 15 Dec 2020 00:08:42 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id CYCkYY1788612xteHL4lunrq; Tue, 15 Dec 2020 00:08:41 -0800 X-Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web11.8117.1608019720454612047 for ; Tue, 15 Dec 2020 00:08:41 -0800 X-Received: from localhost.localdomain ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Tue, 15 Dec 2020 16:08:36 +0800 X-WM-Sender: fengyunhua@byosoft.com.cn From: "fengyunhua" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yuwei Chen Subject: [edk2-devel] [PATCH v2] BaseTools/Scripts: Check for added newline at end of file Date: Tue, 15 Dec 2020 16:08:11 +0800 Message-Id: <20201215080811.2305-1-fengyunhua@byosoft.com.cn> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,fengyunhua@byosoft.com.cn X-Gm-Message-State: h04QeOe9gTU8H8k5MQcdYndFx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608019721; bh=S4zeSEcAl8DblrLrCfPhS19gB/kNuJCVukSRcFLSSik=; h=Cc:Date:From:Reply-To:Subject:To; b=CdxkzXsTZzra+59aArXey8Oyf+4FuQ/uOkxNpt6uxkRAP9H/mJME4AE8NIMnbgwTzhc b8SvOnAr7mTxMvDy+cpSDh+RaXZoCtPPDFYioalbqbQdXQFzTXP0pVn15KZy+xvp2sePt HIu3mE7/AbK08Yv3ORnt0CNMyqp78enINMg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2685 Adding blank lines at end of file is bad enough practice that git complains about it when importing patches (with git am): .git/rebase-apply/patch:105: new blank line at EOF. + warning: 1 line adds whitespace errors. Cc: Bob Feng Cc: Liming Gao Cc: Yuwei Chen Signed-off-by: Yunhua Feng --- BaseTools/Scripts/PatchCheck.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index 68c984ed0e..61ce0a8a43 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -316,6 +316,9 @@ class GitDiffCheck: self.new_bin =3D [] while self.line_num < self.count and self.format_ok: line_num =3D self.line_num + if self.lines[line_num].strip() =3D=3D '+': + if line_num + 1 < self.count and self.lines[line_num + 1].= startswith('diff --git') or self.lines[line_num + 1].strip() =3D=3D '--': + self.format_error('New blank line at EOF.') self.run() assert(self.line_num > line_num) self.report_message_result() --=20 2.27.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#68850): https://edk2.groups.io/g/devel/message/68850 Mute This Topic: https://groups.io/mt/78972034/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-