[AMD Official Use Only - General] Reviewed-by: Abner Chang <abner.ch...@amd.com>
> -----Original Message----- > From: Nickle Wang <nick...@nvidia.com> > Sent: Thursday, February 29, 2024 4:53 PM > To: devel@edk2.groups.io > Cc: Chang, Abner <abner.ch...@amd.com>; Igor Kulchytskyy > <ig...@ami.com> > Subject: [edk2-redfish-client][PATCH 01/13] RedfishClientPkg/.github: do not > run uncrustify to deleted file. > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > 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 <nick...@nvidia.com> > Cc: Abner Chang <abner.ch...@amd.com> > Cc: Igor Kulchytskyy <ig...@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 (#116297): https://edk2.groups.io/g/devel/message/116297 Mute This Topic: https://groups.io/mt/104640215/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-