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

enforce formatting of C++ code #76

Merged
merged 13 commits into from
Nov 4, 2024
Merged

enforce formatting of C++ code #76

merged 13 commits into from
Nov 4, 2024

Conversation

shapiromatron
Copy link
Collaborator

@shapiromatron shapiromatron commented Nov 1, 2024

Using clang-format, enforce styling and formatting of bmdscore source code.

To run, you'll need to install a specific version of clang-format, the easiest way I found fo reproducible installation was a python wrapper, https://pypi.org/project/clang-format/19.1.3/.

Then, you can run the make command make format-cpp. We run this in CI/CD and checks that the git diff is clean to ensure code is properly formatted.

I added a basic .clang-format file, but that could be modified to make the code look more to our personal preferences.

I did have to make a few manual edits to get the code to compile again after running the formatter, 702b73,

@shapiromatron shapiromatron marked this pull request as ready for review November 1, 2024 19:30
@shapiromatron
Copy link
Collaborator Author

@cwsimmon could you mark as accepted if you're ok w/ the changes?

Copy link
Collaborator

@cwsimmon cwsimmon left a comment

Choose a reason for hiding this comment

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

LGTM

@shapiromatron shapiromatron merged commit 4b2cde6 into main Nov 4, 2024
2 checks passed
@shapiromatron shapiromatron deleted the clang-format branch November 4, 2024 23:05
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.

2 participants