From: "Nickle Wang via groups.io" <nicklew=nvidia.com@groups.io>
To: <devel@edk2.groups.io>
Cc: Abner Chang <abner.chang@amd.com>, Igor Kulchytskyy <igork@ami.com>
Subject: [edk2-devel] [edk2-redfish-client][PATCH 01/13] RedfishClientPkg/.github: do not run uncrustify to deleted file.
Date: Thu, 29 Feb 2024 16:52:58 +0800 [thread overview]
Message-ID: <20240229085258.111854-1-nicklew@nvidia.com> (raw)
Check to see if file exists or not before running uncrustify.
The file in change list may be a deleted file.
Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
.github/workflows/uncrustify-check.sh | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/uncrustify-check.sh b/.github/workflows/uncrustify-check.sh
index 7c1765cff..e6cf00b1f 100755
--- a/.github/workflows/uncrustify-check.sh
+++ b/.github/workflows/uncrustify-check.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+# Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -40,12 +40,17 @@ fi
for file in $CHANGED_FILES
do
- echo "Uncrustify check file: $file"
- uncrustify -c $CONFIG_FILE -f $file --check
- if [ $? -ne 0 ]
+ if [ -e "$file" ]
then
- echo "Uncrustify check failure on file: $file"
- FAILURE=1
+ echo "Uncrustify check file: $file"
+ uncrustify -c $CONFIG_FILE -f $file --check
+ if [ $? -ne 0 ]
+ then
+ echo "Uncrustify check failure on file: $file"
+ FAILURE=1
+ fi
+ else
+ echo "File does not exist (deleted file?): $file"
fi
done
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116141): https://edk2.groups.io/g/devel/message/116141
Mute This Topic: https://groups.io/mt/104640215/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next reply other threads:[~2024-02-29 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 8:52 Nickle Wang via groups.io [this message]
2024-03-04 1:53 ` [edk2-devel] [edk2-redfish-client][PATCH 01/13] RedfishClientPkg/.github: do not run uncrustify to deleted file Chang, Abner via groups.io
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=20240229085258.111854-1-nicklew@nvidia.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