-
Notifications
You must be signed in to change notification settings - Fork 7
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
Adds scripts, Dockerfiles, and GitHub Actions CI for checking formatting and autoformatting #124
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
hariharan-devarajan
requested changes
Oct 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets address the comments we made during meeting.
ilumsden
force-pushed
the
autoformatting
branch
from
October 18, 2024 19:24
ad70bdb
to
5ed61c4
Compare
@hariharan-devarajan all the requested changes to this PR are complete. |
ilumsden
force-pushed
the
autoformatting
branch
from
October 18, 2024 20:14
8b7a4bf
to
5594381
Compare
ilumsden
force-pushed
the
autoformatting
branch
from
November 13, 2024 21:23
5594381
to
cdec006
Compare
wangvsa
reviewed
Dec 13, 2024
…ouping and ordering
ilumsden
force-pushed
the
autoformatting
branch
from
December 16, 2024 23:30
cdec006
to
fc7ba50
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since I know there's been some issues with formatting (mostly due to my VSCode being stupid), I put together this PR to provide some new tools to help us with code formatting. This PR is heavily based on LLNL/Caliper#605, which I put together for the same reason.
This PR adds several scripts to the repo (all can be found in
scripts/formatting/
):check-formatting.sh
: usesclang-format
to check if the files insrc/
andinclude/
are formatted correctlyautoformat.sh
: usesclang-format
to autoformat the files insrc/
andinclude/
Dockerfile.check
: a Dockerfile that runscheck-formatting.sh
withclang-format
v17.0.6Dockerfile.format
: a Dockerfile that runsautoformat.sh
withclang-format
v17.0.6check-formatting-docker.sh
: a script that builds and runsDockerfile.check
autoformat-docker.sh
: a script that builds and runsDockerfile.format
Additionally, this PR adds a new GitHub Actions workflow to check if code is formatted correctly. This script is essentially just a GitHub CI version of
Dockerfile.check
.Finally, this PR adds the results of autoformatting the repo.