This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 7cb544a8f ci: Force style check workflow to use pip-installed 
clang-format
7cb544a8f is described below

commit 7cb544a8f81875257d5437176b81f123a1ab1df9
Author: Szymon Czapracki <[email protected]>
AuthorDate: Tue Jun 24 13:02:51 2025 +0200

    ci: Force style check workflow to use pip-installed clang-format
    
    Replace apt-based clang-format install with pip to ensure
    consistency across environments.
    
    Also update diff base to use merge-base and switch to
    clang-format-diff.py for more accurate formatting checks.
---
 .github/workflows/compliance_check.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/compliance_check.yml 
b/.github/workflows/compliance_check.yml
index e40ffede8..cd92851cf 100644
--- a/.github/workflows/compliance_check.yml
+++ b/.github/workflows/compliance_check.yml
@@ -32,8 +32,7 @@ jobs:
       - name: Install Dependencies
         shell: bash
         run: |
-             sudo apt-get update
-             sudo apt-get install -y clang-format
+             python -m pip install clang-format
       - name: check style
         shell: bash
         run: |
@@ -45,8 +44,9 @@ jobs:
 
           set +e
           
INFO_URL="https://github.com/apache/mynewt-core/blob/master/CODING_STANDARDS.md";
-          git diff -U0 origin/master...HEAD > diff.patch
-          clang-format-diff -p1 -style=file < diff.patch > clang-fmt.patch
+          GIT_BASE=$(git merge-base origin/master HEAD)
+          git diff -U0 "$GIT_BASE"...HEAD > diff.patch
+          clang-format-diff.py -p1 -style=file < diff.patch > clang-fmt.patch
           if [ -s clang-fmt.patch ]; then
             echo "Code formatting issues found:"
             cat clang-fmt.patch

Reply via email to