Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

format-check: add collect errors job#196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
pennam merged 2 commits intoarduino:mainfrompillo79:pr-fix-format-check-ui
Sep 18, 2025

Conversation

pillo79
Copy link

The Github UI for required checks does not integrate with the workflows described in the .github directory. Currently jobs that are never started due to conditional execution are not even reported, so the UI shows "expected" and locks up merges.

Collect format errors so that the Github UI can be happy to track one job that is always executed. This job will fail if any of the format-check jobs failed or were cancelled, and will be ignored (but reported) otherwise.

@pillo79pillo79force-pushed thepr-fix-format-check-ui branch 11 times, most recently from5f27c2b to0485300CompareSeptember 9, 2025 15:52
@pillo79
Copy link
Author

pillo79 commentedSep 9, 2025
edited
Loading

@iabdalkader@pennam fixed CI one more time, hopefully for good. This change ensures jobs always run and always fail / skip so that the Github rules are followed. See#197 for a failing case.

Had to duplicate the list of filters becauseclang-format-action does not allow explicitly naming files. May push a PR to them as well 😉

@iabdalkader
Copy link

fixed CI one more time, hopefully for good. This change ensures jobs always run and always fail / skip so that the Github rules are followed. See#197 for a failing case.

I don't understand the issue. Maybe it would help if you let us know how to reproduce it? Would any PR with broken code or formatting trigger it?

@pennam
Copy link

@iabdalkader see#189 merge is blocked due to "wating status to be reported"

The Github UI for required checks does not integrate with the workflowsdescribed in the .github directory. Currently jobs that are neverstarted due to conditional execution are not even reported, so the UIshows "expected" and locks up merges.Rework the format-check workflow to first list the modified files thatneed to be checked, and then run the check only on those files. Thisway the test runs on every pull request, but has minimal impact unlessone or more source files are actually modified.Requires a branched version of jidicula/clang-format-action 4.15.0 thatadds the 'check-files-from' input parameter.Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Do not set a name for the verify-core job, as this causes the GitHub UIto show a generic name in the required status checks list.
@iabdalkader
Copy link

see#189 merge is blocked due to "wating status to be reported"

@pennam@pillo79 Does this fix the issue#198? It requires less changes, and nochanged-files action. Note sinceverify-format is a required check (https://github.com/arduino/ArduinoCore-zephyr/settings/rules/4713556) I've followed what you did here and removed the path filters.

I tested it in two PRs with/without code changes, both pass:

#198 No code changes -> pass
#187 With code changes that require format check -> pass

@pillo79
Copy link
Author

@iabdalkader@pennam please re-review. In addition to fixing CI, this now limits the check to the actual files changed by the PR, so that unrelated files do not cause blocks. It does also show the error in the summary and as a Github note, to simplify locating it. Going to push my changes upstream so that hopefully will be switching back to them.

failOnError:false

verify-core:
name:Collect job errors
Copy link

@iabdalkaderiabdalkaderSep 10, 2025
edited
Loading

Choose a reason for hiding this comment

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

Just an FYI this works too:name: verify-core. I guess you could also quote the name.

pillo79 reacted with thumbs up emoji
Copy link
Author

Choose a reason for hiding this comment

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

Yes it's the same. I hate that GH matches the actual string generated by the job and not some unmistakable ID. At least in the UI itverify-core looks clearer now as a requirement.

-name:Run clang-format check
uses:jidicula/clang-format-action@v4.15.0
if:steps.changed-files.outputs.any_changed == 'true'
uses:pillo79/clang-format-action@05f671e71f0758aba4d3c9dbb0ee81bc5f0137c6

Choose a reason for hiding this comment

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

I suppose this is now needed for the action to work with these changes? Kind of an issue if your changes don't make it upstream.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, it is required for thecheck-files-from parameter. Very odd that the original action requires a folder and then does afind to list files and runsclang-format on each, but did not support specifying the files directly 🙂
There's also a bug that prevents showing the expected changes on the error annotation as expected, so I added them back.
The project looks active and maintained so I'm pretty sure this can be merged, especially if we show it in use.

persist-credentials:false

-name:Get changed source files that need format check
id:changed-files

Choose a reason for hiding this comment

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

This is okay, but is running the formatter on all PRs unconditionally that bad? Most of the PRs will likely contain code changes anyway.

Copy link
Author

Choose a reason for hiding this comment

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

I kept the original idea of limiting the execution to PRs that needed it. Not a problem right now, but PRs being blocked due to compliance on unrelated files is so much of an issue in Zephyr proper that they don't enable this kind of filters 🙂

@iabdalkader
Copy link

This does fix the issue, however kinda adds a dependency on your custom action. I prefer we just keep it simple, at least for now, and run the formatter workflow unconditionally ( as done in#198). Otherwise, I don't really have any other feedback, the choice is yours.

@pennampennam merged commit4840a0d intoarduino:mainSep 18, 2025
18 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@iabdalkaderiabdalkaderiabdalkader left review comments

@pennampennampennam approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@pillo79@iabdalkader@pennam

[8]ページ先頭

©2009-2025 Movatter.jp