Skip to content
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

check code format in CI #533

Merged
merged 28 commits into from
Oct 29, 2024
Merged

check code format in CI #533

merged 28 commits into from
Oct 29, 2024

Conversation

edwardhartnett
Copy link
Contributor

@edwardhartnett edwardhartnett commented Oct 29, 2024

Fixes #509

This is of interest to any code manager with C code.

In this PR, at @DusanJovic-NOAA suggestion, I add clang-format to check code format before merging.

Note that the CI does not automatically format code, it just detects when code is badly formatted. Use clang-format locally to reformat any failing code.

Code must comply with clang-format-18 (which is what is currently available for ubuntu-24). Earlier versions of clang-format have an annoying bug that is activated in g2c code, so clang-format-18 is the earliest version that works.

In order to get clang-format-18 I had to change the image to ubuntu-24.04 in the developer workflow. However, soon this will be ubuntu-latest.

Updating the version of ubuntu also updated the version of doxygen, leading to some new doxygen warnings, which I fixed by running doxygen -u on the Doxyfile.in.

No code changes in this PR, just formatting.

@edwardhartnett edwardhartnett marked this pull request as ready for review October 29, 2024 10:59
@edwardhartnett edwardhartnett merged commit da8e6f1 into develop Oct 29, 2024
37 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.

Enforce proper code formatting
3 participants