[edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg/.github: fix uncrustify check error

Nickle Wang via groups.io posted 1 patch 10 months, 2 weeks ago
Failed in applying to current master (apply log)
.github/workflows/uncrustify-check.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
[edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg/.github: fix uncrustify check error
Posted by Nickle Wang via groups.io 10 months, 2 weeks ago
Only run uncrustify check to c file and h file in script.

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 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/uncrustify-check.sh b/.github/workflows/uncrustify-check.sh
index 59ebc0dc..ff61a6ae 100755
--- a/.github/workflows/uncrustify-check.sh
+++ b/.github/workflows/uncrustify-check.sh
@@ -31,7 +31,13 @@ fi
 cd "$REPO_PATH"
 
 FAILURE=0
-CHANGED_FILES=$(git diff --name-only HEAD~$NO_COMMITS)
+CHANGED_FILES=$(git diff --name-only HEAD~$NO_COMMITS | grep '\(\.c$\|\.h$\)')
+if [ -z "$CHANGED_FILES" ]
+then
+  echo "No c or h file to run uncrustify check"
+  exit 0
+fi
+
 for file in $CHANGED_FILES
 do
   echo "Uncrustify check file: $file"
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#106055): https://edk2.groups.io/g/devel/message/106055
Mute This Topic: https://groups.io/mt/99505410/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg/.github: fix uncrustify check error
Posted by Chang, Abner via groups.io 10 months, 2 weeks ago
[AMD Official Use Only - General]

Reviewed-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Tuesday, June 13, 2023 9:32 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>
> Subject: [edk2-redfish-client][PATCH] RedfishClientPkg/.github: fix uncrustify
> check error
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Only run uncrustify check to c file and h file in script.
>
> 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 | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/.github/workflows/uncrustify-check.sh
> b/.github/workflows/uncrustify-check.sh
> index 59ebc0dc..ff61a6ae 100755
> --- a/.github/workflows/uncrustify-check.sh
> +++ b/.github/workflows/uncrustify-check.sh
> @@ -31,7 +31,13 @@ fi
>  cd "$REPO_PATH"
>
>  FAILURE=0
> -CHANGED_FILES=$(git diff --name-only HEAD~$NO_COMMITS)
> +CHANGED_FILES=$(git diff --name-only HEAD~$NO_COMMITS | grep
> '\(\.c$\|\.h$\)')
> +if [ -z "$CHANGED_FILES" ]
> +then
> +  echo "No c or h file to run uncrustify check"
> +  exit 0
> +fi
> +
>  for file in $CHANGED_FILES
>  do
>    echo "Uncrustify check file: $file"
> --
> 2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#106080): https://edk2.groups.io/g/devel/message/106080
Mute This Topic: https://groups.io/mt/99505410/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-