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

Introduce clang-format in pre-commit #125

Merged
merged 4 commits into from
Oct 28, 2022

Conversation

chrispap95
Copy link
Collaborator

clang-format in pre-commit for C++ files (only src/_ext.cpp for us).

@jmduarte jmduarte linked an issue Oct 26, 2022 that may be closed by this pull request
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

The formatted version of _ext.cpp is much easier to read.

That .clang-format file is exactly what I would consider "hard to set up," but having a working model (boost-histogram) helps considerably. I think we'll copy this to format the C++ in Awkward Array. :)

@henryiii
Copy link
Member

exactly what I would consider "hard to set up,"

It was basically running -style=llvm, dumping the values to a file, then modifying them ever so slightly to work nicer on pybind11 and to fix one perceived alignment issue (int *x vs int* x).

@jmduarte jmduarte merged commit 4c0a3f2 into scikit-hep:main Oct 28, 2022
@chrispap95 chrispap95 deleted the clang-format branch November 1, 2022 10:55
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.

Run clang-tidy (or clang-format?) on src/_ext.cpp
4 participants