Skip to content

cores: arduino: Format with clang-format#166

Merged
DhruvaG2000 merged 1 commit intozephyrproject-rtos:nextfrom
soburi:prepare_merge
Feb 28, 2026
Merged

cores: arduino: Format with clang-format#166
DhruvaG2000 merged 1 commit intozephyrproject-rtos:nextfrom
soburi:prepare_merge

Conversation

@soburi
Copy link
Copy Markdown
Member

@soburi soburi commented Feb 26, 2026

Use a formatter to standardize indentation.


Committing to reduce the diff in preparation for the merge.

Please approve #163 and #165 first.

@soburi soburi marked this pull request as ready for review February 26, 2026 21:14
Copilot AI review requested due to automatic review settings February 26, 2026 21:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR primarily applies clang-format style changes across the Arduino Zephyr core to standardize indentation and brace placement, while also pulling in a couple of functional tweaks that go beyond formatting.

Changes:

  • Reformat Arduino core sources/headers (Serial, Print, common utilities, entrypoint) for consistent style.
  • Update the hello_arduino sample printk format specifiers to use %zu for size_t.
  • Modify delay() / delayMicroseconds() in zephyrCommon.cpp (adds always_inline attribute and changes microsecond delay behavior).

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
samples/hello_arduino/src/app.cpp Updates printk size_t format specifiers (%zu).
cores/arduino/zephyrSerial.h clang-format pass over Serial class declarations/macros.
cores/arduino/zephyrSerial.cpp clang-format pass; macro formatting and serialEventRun braces.
cores/arduino/zephyrPrint.h clang-format pass over inline Print methods and helpers.
cores/arduino/zephyrPrint.cpp clang-format pass over Print support implementation.
cores/arduino/zephyrCommon.cpp clang-format pass plus behavioral changes to delay functions.
cores/arduino/main.cpp clang-format pass; adds braces around serialEventRun call.
cores/arduino/apiCommon.cpp clang-format pass; whitespace/indent changes.
cores/arduino/Arduino.h clang-format pass over devicetree-related macros/enums.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@DhruvaG2000 DhruvaG2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please rebase on top of just next?
Just the commit "cores: arduino: Format with clang-format" is fine for this PR.

Also, any ideas on how we can add clang format checks as part of our PR CI's itself? Will help maintain formatting in future as well

@soburi
Copy link
Copy Markdown
Member Author

soburi commented Feb 27, 2026

Can you please rebase on top of just next? Just the commit "cores: arduino: Format with clang-format" is fine for this PR.

Also, any ideas on how we can add clang format checks as part of our PR CI's itself? Will help maintain formatting in future as well

It's best not to enforce this. Rules change sometimes, and sometimes not following the rules is easier to read.

Use a formatter to standardize indentation.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
@DhruvaG2000 DhruvaG2000 merged commit 8f7c7db into zephyrproject-rtos:next Feb 28, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants