You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@mynewt.apache.org by "szymon-czapracki (via GitHub)" <gi...@apache.org> on 2025/06/12 14:16:44 UTC

[PR] Improve clang-format check step and update runner to Ubuntu 24.04 in CI workflow [mynewt-core]

szymon-czapracki opened a new pull request, #3431:
URL: https://github.com/apache/mynewt-core/pull/3431

   This PR updates the coding style check work-flow with the following improvements:
   
   - Changes the GitHub Actions runner from ubuntu-latest to ubuntu-24.04.
   
   - Explicitly sets bash as the shell for the clang-format check step.
   
   - Modifies the clang-format-diff command to pipe output through tee.
   
   These changes improve formatting issue detection and debugging during CI runs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Improve clang-format check step and update runner to Ubuntu 24.04 in CI workflow [mynewt-core]

Posted by "szymon-czapracki (via GitHub)" <gi...@apache.org>.
szymon-czapracki commented on PR #3431:
URL: https://github.com/apache/mynewt-core/pull/3431#issuecomment-2967015267

   @sjanc @kasjer FYI


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Improve clang-format check step and update runner to Ubuntu 24.04 in CI workflow [mynewt-core]

Posted by "szymon-czapracki (via GitHub)" <gi...@apache.org>.
szymon-czapracki commented on code in PR #3431:
URL: https://github.com/apache/mynewt-core/pull/3431#discussion_r2143702826


##########
.github/workflows/check_compliance.yml:
##########
@@ -42,13 +42,18 @@ jobs:
           sudo apt-get install -y clang-format
 
       - name: Check formatting (diff only)
+        shell: bash
         run: |
+          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
-            exit 1
+            echo ""
+            echo "For formatting guidelines, see:"
+            echo "  $INFO_URL"

Review Comment:
   Fixup leftover, exit is now present - job is failing on style issues.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Improve clang-format check step and update runner to Ubuntu 24.04 in CI workflow [mynewt-core]

Posted by "sjanc (via GitHub)" <gi...@apache.org>.
sjanc commented on code in PR #3431:
URL: https://github.com/apache/mynewt-core/pull/3431#discussion_r2143512463


##########
.github/workflows/check_compliance.yml:
##########
@@ -42,13 +42,18 @@ jobs:
           sudo apt-get install -y clang-format
 
       - name: Check formatting (diff only)
+        shell: bash
         run: |
+          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
-            exit 1
+            echo ""
+            echo "For formatting guidelines, see:"
+            echo "  $INFO_URL"

Review Comment:
   why 'exit 1' is removed?  job should fail on style issues



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Improve clang-format check step and update runner to Ubuntu 24.04 in CI workflow [mynewt-core]

Posted by "sjanc (via GitHub)" <gi...@apache.org>.
sjanc merged PR #3431:
URL: https://github.com/apache/mynewt-core/pull/3431


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org