-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add clang-format and run it on the code-base #384
Conversation
Tagging the most frequent contributors to reactor-c here for your information: @petervdonovan @ChadliaJerad @lhstrh @lsk567 Anyone else that is working on major features? |
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.
LGTM. Let's do this and get the pain over with.
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.
Yep, I'm on board with this. This will probably make CONTRIBUTING.md, which was never really used anyway, out of date. We should probably just delete CONTRIBUTING.md.
EDIT: This reminds me, if there is a way to do this that will make it easier to reach partial compliance with a standard like MISRA (that is, compliance with the parts that make sense for us), then that might be worth considering. But I have no expertise on that and I'm sure you've already considered that, so I'm not going to try to make a lot of noise about it.
@petervdonovan regarding MISRA. I think that goes beyond formatting and is more a topic of linting? There is a static analysis/linting tool called clang-tidy that we could integrate also. I do not know a lot on this topic though. |
Thank you @lhstrh! |
Sorry it took so long... No need for this to hold you up either. The tests are clearly passing, so it's also fine to bypass the merge queue and merge directly this time. |
This PR replaces #310. It copies clang-format setup from reactor-cpp. I have added a simple Makefile target so to format reactor-c run:
In CI the following check is run which returns an error if it finds anything it would like to change
For any outstanding feature branch I suggest the following strategy:
git cherry-pick 91bc46cd17cbd12eaaa83f4684b3568341f79d6d
Then hopefully there will be few conflicts