-
Notifications
You must be signed in to change notification settings - Fork 27
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
Automatic code formatting using pre-commit and clang-format #148
base: master
Are you sure you want to change the base?
Conversation
This would fix #99. |
I like this! :) |
Uses pre-commit and clang-format to automatically format code before it is committed.
Ignores VS Code and clangd LSP directories.
ad8f5c6
to
388ba80
Compare
Thank you for your submission, we really appreciate it! Like many open-source projects we ask that you sign our Contributor License Agreement before we can accept your contribution.
- [ ] The CADET maintainers know my real name.
At least one of the following two applies:
- [ ] The CADET maintainers know my current employer.
- [ ] I am *not* making this contribution on behalf of my current employer.
|
I've updated the PR to the current master, updated clang and re-formatted everything to confirm nothing breaks. The |
To set up on windows:
To process all files with the new pre-committ workflow:
|
Enables support for pre-commit and clang-format. Code is automatically formatted before committing.
Options for clang-format are documented here. I used this online preview for various clang-format settings. I'm still not fully satisfied, but it's a start.
I'm not sure how this PR will impact other PRs and their "mergeability".