From nobody Mon Feb 9 21:21:14 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+61912+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+61912+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1593612386; cv=none; d=zohomail.com; s=zohoarc; b=gxXfhrCflDI2Qv/Soo61Ued5hnhxGLFcWAj5Hzrm8hkLv9iYO8NIQVgv9r7PQ5l7HJEjBw1lK77Bip6rz61xoYutXs/iKW6xn/C0Cn1ClliEb3KV1bpbi3Ixp/k50aTDaXeic9XrTVh4Y8ModeqJ7R7ZwrXiywX7/Y+joenfUXU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593612386; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=4sLF+MteWiwlDYDb3tfEFaP6CvHt926OHq711hR4vr0=; b=ihIqbLAZJiP4KRYGt/3wOypxcRDTmgr1b5f3GuQdoeVGcp3sJjvHgaglEZlMsJoCn+Z/uxhbbaqMrT6gU+WX1cdFsonqT7eSISukhHShAj05X6mf+cEKLl+im37S9nugbHP+HFLw4Y/YrljHPDaezWvcEh0E5j3mzmZ/s7m+hgs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+61912+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1593612385865993.6485616840667; Wed, 1 Jul 2020 07:06:25 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id oOppYY1788612xe8mOBa70kq; Wed, 01 Jul 2020 07:06:23 -0700 X-Received: from cam-smtp0.cambridge.arm.com (cam-smtp0.cambridge.arm.com [217.140.106.54]) by mx.groups.io with SMTP id smtpd.web10.22630.1593612373210309749 for ; Wed, 01 Jul 2020 07:06:13 -0700 X-Received: from E119881.Arm.com (E119881.Arm.com [10.1.197.28]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id 061E69Zn029795; Wed, 1 Jul 2020 15:06:10 +0100 From: "PierreGondois" To: devel@edk2.groups.io Cc: Pierre Gondois , sami.mujawar@arm.com, tomas.pilar@arm.com, bob.c.feng@intel.com, liming.gao@intel.com, nd@arm.com Subject: [edk2-devel] [PATCH v5 1/5] BaseTools: PatchCheck: Exclude bash scripts from CRLF check Date: Wed, 1 Jul 2020 15:06:00 +0100 Message-Id: <20200701140604.5292-2-pierre.gondois@arm.com> In-Reply-To: <20200701140604.5292-1-pierre.gondois@arm.com> References: <20200701140604.5292-1-pierre.gondois@arm.com> 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,pierre.gondois@arm.com X-Gm-Message-State: wFkKOEPcfkOMkw3795jemQULx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1593612383; bh=KfSvWJn/8CcR+dxX8eXwsdMe9+kY0OdNONX4qzrB2lk=; h=Cc:Date:From:Reply-To:Subject:To; b=Mz8JRhhmtvo6YnU0/Js7YWd0nY2YQG2IbY9WEpb4TQp1rc2UsSzckZan/CCAVKiirI2 7Fb33JDi4r8pdrYLbF0BTSFEJWqdKo2AELFmZDykuMPJS/MKtSPr+aoqdR85//LClODmu 1xgDJ1SGWbyyTUZJrmmcD1tVLC2xsFzhuUA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pierre Gondois Bash scripts require LF line endings to work. PatchCheck.py checks that the files added in a patch have CRLF line endings. It excludes files ending with the ".sh" extension from this check. Some bash script don't have a ".sh" extension. Most of them are located in: - BaseTools/BinWrappers/PosixLike/ - BaseTools/Bin/CYGWIN_NT-5.1-i686/ This patch excludes these folder plus BaseTools/BuildEnv from this CRLF check. Signed-off-by: Pierre Gondois Reviewed-by: Bob Feng --- The changes can be seen at: https://github.com/PierreARM/edk2/commits/803_C= ompile_AML_bytecode_array_into_OBJ_file_v5 Notes: v5: - Exclude some directories/files having LF line endings from the PatchCheck,py script. [Bob] BaseTools/Scripts/PatchCheck.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck= .py index 106b434c750d71d8aa1658109f146dc066633c2c..e38cf61f93da50f77d4e1e2e37d= e5f6a08d25408 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -3,6 +3,7 @@ # # Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.
# Copyright (C) 2020, Red Hat, Inc.
+# Copyright (c) 2020, ARM Ltd. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -384,9 +385,14 @@ class GitDiffCheck: self.is_newfile =3D False self.force_crlf =3D True self.force_notabs =3D True - if self.filename.endswith('.sh'): + if self.filename.endswith('.sh') or \ + self.filename.startswith('BaseTools/BinWrappers/PosixL= ike/') or \ + self.filename.startswith('BaseTools/Bin/CYGWIN_NT-5.1-= i686/') or \ + self.filename =3D=3D 'BaseTools/BuildEnv': # # Do not enforce CR/LF line endings for linux shell sc= ripts. + # Some linux shell scripts don't end with the ".sh" ex= tension, + # they are identified by their path. # self.force_crlf =3D False if self.filename =3D=3D '.gitmodules': --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' =1A=EF=BF=BD.=EF=BF=BD=C8=A8.)=E4=B1=8A.=E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