-
Notifications
You must be signed in to change notification settings - Fork 82
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
Integrate clang-format #176
Conversation
This PR is nonessential, and functionally on-hold; I'll revisit it here and there as I have time to do so. |
Spotted this in my notifications. I don't have much to comment on regarding the style, only the implementation:
|
I don't disagree, but Meson gives it to us for free out of the box, and it saves us having to write and maintain a script to traverse/walk our source tree. Maybe it should just be a separate
What about a git hook? |
Oh, I didn't know this. Quite a questionable feature, but if it needs no extra work then I don't mind.
I'm not sure, I've never used a git hook in a multiperson project, but I think this'd be most useful to newbie contributors, so it should be default and hard to overlook. |
fd03660
to
41929c8
Compare
… of clang-format run
33a88ef
to
1a9c930
Compare
8714748
to
9b75a12
Compare
Usage
For convenience, a
format.sh
script is included; the following command will format the full source tree according to rules specified in.clang-format
:A pre-commit git hook is also included, along with instructions for contributors on how to integrate it into their commit workflow.
Next Steps
clang-format
does not support renaming constants, variables, etc. We will need a separateclang-tidy
integration if we want to standardize that process.