From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>,
sami.mujawar@arm.com, tomas.pilar@arm.com, bob.c.feng@intel.com,
liming.gao@intel.com, nd@arm.com
Subject: [PATCH v5 1/5] BaseTools: PatchCheck: Exclude bash scripts from CRLF check
Date: Wed, 1 Jul 2020 15:06:00 +0100 [thread overview]
Message-ID: <20200701140604.5292-2-pierre.gondois@arm.com> (raw)
In-Reply-To: <20200701140604.5292-1-pierre.gondois@arm.com>
From: Pierre Gondois <pierre.gondois@arm.com>
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 <pierre.gondois@arm.com>
---
The changes can be seen at: https://github.com/PierreARM/edk2/commits/803_Compile_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..e38cf61f93da50f77d4e1e2e37de5f6a08d25408 100755
--- a/BaseTools/Scripts/PatchCheck.py
+++ b/BaseTools/Scripts/PatchCheck.py
@@ -3,6 +3,7 @@
#
# Copyright (c) 2015 - 2020, Intel Corporation. All rights reserved.<BR>
# Copyright (C) 2020, Red Hat, Inc.<BR>
+# Copyright (c) 2020, ARM Ltd. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -384,9 +385,14 @@ class GitDiffCheck:
self.is_newfile = False
self.force_crlf = True
self.force_notabs = True
- if self.filename.endswith('.sh'):
+ if self.filename.endswith('.sh') or \
+ self.filename.startswith('BaseTools/BinWrappers/PosixLike/') or \
+ self.filename.startswith('BaseTools/Bin/CYGWIN_NT-5.1-i686/') or \
+ self.filename == 'BaseTools/BuildEnv':
#
# Do not enforce CR/LF line endings for linux shell scripts.
+ # Some linux shell scripts don't end with the ".sh" extension,
+ # they are identified by their path.
#
self.force_crlf = False
if self.filename == '.gitmodules':
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
next prev parent reply other threads:[~2020-07-01 14:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 14:05 [PATCH v5 0/5] Compile AML bytecode array into OBJ file PierreGondois
2020-07-01 14:06 ` PierreGondois [this message]
2020-07-02 4:21 ` [PATCH v5 1/5] BaseTools: PatchCheck: Exclude bash scripts from CRLF check Bob Feng
2020-07-01 14:06 ` [PATCH 2/5] BaseTools: Generate multiple rules when multiple output files PierreGondois
2020-07-01 14:06 ` [PATCH v5 3/5] BaseTools: Rename AmlToHex script to AmlToC PierreGondois
2020-07-01 14:06 ` [PATCH v5 4/5] BaseTools: Compile AML bytecode arrays into .obj file PierreGondois
2020-07-27 13:58 ` [edk2-devel] " Leif Lindholm
2020-07-27 14:13 ` Sami Mujawar
2020-07-27 14:21 ` Liming Gao
2020-07-27 17:10 ` PierreGondois
2020-07-28 0:40 ` Liming Gao
2020-07-28 1:38 ` Masahisa Kojima
2020-07-28 9:04 ` PierreGondois
2020-07-28 11:19 ` Leif Lindholm
2020-07-29 0:17 ` Masahisa Kojima
2020-07-01 14:06 ` [PATCH v5 5/5] BaseTools: Fix string concatenation PierreGondois
2020-07-02 10:20 ` [PATCH v5 0/5] Compile AML bytecode array into OBJ file Bob Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200701140604.5292-2-pierre.gondois@arm.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox