Skip to content

Improve clang-format check step and update runner to Ubuntu 24.04 in CI workflow #3431

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 13, 2025

Conversation

szymon-czapracki
Copy link
Contributor

@szymon-czapracki szymon-czapracki commented Jun 12, 2025

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.

  • Adds option to align consecutive macros.

These changes improve formatting issue detection and debugging during CI runs.

Changed the GitHub Actions runner from ubuntu-latest to ubuntu-24.04
to ensure compatibility and consistency with the project environment.
@szymon-czapracki
Copy link
Contributor Author

@sjanc @kasjer FYI

@szymon-czapracki szymon-czapracki marked this pull request as draft June 12, 2025 14:35
@szymon-czapracki szymon-czapracki marked this pull request as draft June 12, 2025 14:35
@szymon-czapracki szymon-czapracki force-pushed the clang_compliance_fix branch 2 times, most recently from 6fccbc3 to 99a9334 Compare June 12, 2025 15:41
@github-actions github-actions bot added size/s and removed size/xs labels Jun 12, 2025
@szymon-czapracki szymon-czapracki marked this pull request as ready for review June 12, 2025 15:43
exit 1
echo ""
echo "For formatting guidelines, see:"
echo " $INFO_URL"
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

Use `bash` explicitly for the formatting check
step for better shell compatibility

Set bash +e setting so scripts won't exit
on cmd non-zero status.
Add the `AlignConsecutiveMacros: true` option to the `.clang-format` file
to improve readability and consistency of consecutive macro definitions.

This change ensures that related macros are visually aligned, making the
codebase easier to maintain and review.
If the job fails inform about coding standards.
@sjanc sjanc merged commit 3bff29c into apache:master Jun 13, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants