public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nickle Wang" <nicklew@nvidia.com>
To: <devel@edk2.groups.io>
Cc: Abner Chang <abner.chang@amd.com>, Igor Kulchytskyy <igork@ami.com>
Subject: [edk2-redfish-client][PATCH] RedfishClientPkg/.github: fix uncrustify check error
Date: Tue, 13 Jun 2023 21:32:28 +0800	[thread overview]
Message-ID: <20230613133228.22425-1-nicklew@nvidia.com> (raw)

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


             reply	other threads:[~2023-06-13 13:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 13:32 Nickle Wang [this message]
2023-06-14  8:01 ` [edk2-redfish-client][PATCH] RedfishClientPkg/.github: fix uncrustify check error Chang, Abner

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=20230613133228.22425-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