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

Update format checking to clang-format version 18 #229

Merged
merged 11 commits into from
Dec 12, 2024

Conversation

petercamps
Copy link
Contributor

@petercamps petercamps commented Dec 11, 2024

Motivation
It has become hard to find and install clang-format version 9. However, the previous attempt in pull request #227 for updating the clang-format version was flawed. Please disregard any information in that pull request.

Description
With this pull-request the SKIRT repository is updated to use clang-format version 18.1. This is the most recent version that can be easily installed on Ubuntu 24.04 and with some effort on macOS as well.

Specifically:

  • The formatSourceCode.sh shell script and the GitHub format checking workflow now use clang-format version 18.1.
  • The formatSourceCode.sh shell script now performs the formatting on multiple cores in parallel.
  • The Github format checking workflow now fails in case clang-format fails (e.g. because of an unsupported option).
  • The SKIRT source code is updated to the slightly different formatting results.

Action required for developers
Developers who wish to contribute to the repository should install clang-format version 18.1 on their system and include its path in the PATH environment variable.

  • On Ubuntu, this should be easy using the apt package manager.
  • On macOS, the tool must be built from source code using an install tool such as port or brew. The clang-format tool included with Xcode is not lined up with official LLVM versions.

@petercamps petercamps changed the title Fix issue in source-code formatting options Update format checking to clang-format version 18 Dec 12, 2024
@petercamps petercamps merged commit 25b0d18 into SKIRT:master Dec 12, 2024
5 checks passed
@petercamps petercamps deleted the fixformat branch December 12, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant