public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-redfish-client][PATCH] RedfishClientPkg/.github: fix uncrustify check error
@ 2023-06-13 13:32 Nickle Wang
  2023-06-14  8:01 ` Chang, Abner
  0 siblings, 1 reply; 2+ messages in thread
From: Nickle Wang @ 2023-06-13 13:32 UTC (permalink / raw)
  To: devel; +Cc: Abner Chang, Igor Kulchytskyy

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [edk2-redfish-client][PATCH] RedfishClientPkg/.github: fix uncrustify check error
  2023-06-13 13:32 [edk2-redfish-client][PATCH] RedfishClientPkg/.github: fix uncrustify check error Nickle Wang
@ 2023-06-14  8:01 ` Chang, Abner
  0 siblings, 0 replies; 2+ messages in thread
From: Chang, Abner @ 2023-06-14  8:01 UTC (permalink / raw)
  To: Nickle Wang, devel@edk2.groups.io; +Cc: Igor Kulchytskyy

[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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-14  8:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-13 13:32 [edk2-redfish-client][PATCH] RedfishClientPkg/.github: fix uncrustify check error Nickle Wang
2023-06-14  8:01 ` Chang, Abner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox