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
commit 17c882f1d749c6df4bea1e2f29f67935485f83db Author: Szymon Czapracki <szymon.czapra...@codecoup.pl> AuthorDate: Fri Jun 13 17:30:50 2025 +0200 ci: Replace uncrustify with clang-format in style-check Remove uncrustify installation and config usage. Install clang-format instead. Add check to compare local .clang-format with core version to prevent config mismatch. Use clang-format-diff on git diff to enforce style. --- .github/workflows/compliance_check.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/compliance_check.yml b/.github/workflows/compliance_check.yml index a0eef08bb..e40ffede8 100644 --- a/.github/workflows/compliance_check.yml +++ b/.github/workflows/compliance_check.yml @@ -33,13 +33,30 @@ jobs: shell: bash run: | sudo apt-get update - sudo apt-get install -y uncrustify - mkdir repos - git clone --depth=1 https://github.com/apache/mynewt-core repos/apache-mynewt-core + sudo apt-get install -y clang-format - name: check style shell: bash run: | - ./repos/apache-mynewt-core/.github/check_style.py + wget -O .clang-format-core https://raw.githubusercontent.com/apache/mynewt-core/refs/heads/master/.clang-format + if ! cmp -s ".clang-format-core" ".clang-format"; then + echo "Mismatched clang-format configurations!" + exit 1 + fi + + 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 + if [ -s clang-fmt.patch ]; then + echo "Code formatting issues found:" + cat clang-fmt.patch + echo "" + echo "For formatting guidelines, see:" + echo " $INFO_URL" + exit 1 + else + echo "All good, no formatting issues." + fi style_license: name: Licensing