workflows: Add clang format check workflow.#143
workflows: Add clang format check workflow.#143DhruvaG2000 merged 1 commit intozephyrproject-rtos:nextfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds automated clang-format checking to the CI pipeline by cherry-picking configuration from the ArduinoCore-zephyr repository. The workflow will run on code changes to C/C++ files and enforce consistent code formatting across the project.
- Adds GitHub Actions workflow for automated clang-format validation
- Introduces comprehensive clang-format configuration based on LLVM style with Zephyr-specific customizations
- Configures format checking for specific project directories (cores/arduino, loader, libraries) with selective exclusions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/format_check.yml |
New workflow that triggers format checks on C/C++ file changes using clang-format v19 across multiple project directories |
.clang-format |
Configuration file defining LLVM-based formatting rules with Zephyr macros, 100-column limit, and project-specific style preferences |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| exclude: 'examples' | ||
| exclude: 'extras' | ||
| exclude: 'ea_malloc' |
There was a problem hiding this comment.
The matrix configuration has duplicate 'exclude' keys. In YAML, when the same key appears multiple times at the same level, only the last value is retained. This means only 'ea_malloc' will be excluded, and the 'loader/llext_exports.c$' and 'examples' exclusions will be ignored. These should be combined into a single exclude pattern using regex alternation, or the matrix structure should be redesigned to support multiple exclusions per path.
| exclude: 'examples' | |
| exclude: 'extras' | |
| exclude: 'ea_malloc' | |
| exclude: 'examples|extras|ea_malloc' |
| workflow_dispatch: | ||
| inputs: | ||
| logLevel: | ||
| description: 'Log level' |
There was a problem hiding this comment.
There is trailing whitespace after 'Log level' on this line. This should be removed to maintain consistent code formatting.
| description: 'Log level' | |
| description: 'Log level' |
DhruvaG2000
left a comment
There was a problem hiding this comment.
I know this is just a cherrypick, but it would still be better if you added your SoB, since you are the one cherrypicking it to this project.
Also amend the commit body to contain something useful and resolve the github copilot review issues.
Thanks!
Signed-off-by: iabdalkader <i.abdalkader@gmail.com> Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
|
@DhruvaG2000
I added sign-off-by line.
Copilot's point is about formatting. |
…alWrite_inverted Portenta H7: Fix digital-pin-gpios - problem with digitalWrite
Cherry-pick the commit adding .clang-format from https://github.com/arduino/ArduinoCore-zephyr.