-
Notifications
You must be signed in to change notification settings - Fork 8
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 coding style with clang-format #22
Comments
I'm all pro adding a This is also already on the project's ToDo list. I should probably add that ToDo list to this github project (eg. issues) given that I am no longer the only one using this library :) |
I will create a corresponding |
I've added a preliminary |
I found that but it only verifies the code, it doesn't run clang-format which was what I was thinking of. I think I can just have a script which runs on |
Is the |
Nope, I'm currently unhappy with it. Notably I haven't yet found the settings for putting attributes such as |
Not sure all of those can be done with |
I'm currently trying to find a way for |
I don't know of a way to make clang-format give that detailed reporting. I usually use https://zed0.co.uk/clang-format-configurator/ for new setups and/or major changes. It gives a live preview on how the code is formatted and you can upload an existing config too |
I noticed a coding style document has been added. I use clang-format personally which I disabled when working on this project. Only (some of) my changes are clang-formatted (and therefore do wrap at 80 :p). I suggest having a .clang-format file that enforces the style checked in. I've heard you can setup github actions to also run it over pull requests automagically but I'm not sure how (I'll look into it).
If we do add a clang-format file I'd also like to request that we run it over the whole codebase once and check that in, that way I can turn format on save back on without messing up the entire file :p.
The text was updated successfully, but these errors were encountered: