-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Milestone
Description
I'd like to introduce a requirement for formatting. We can do this automagically using clang-format. Can we agree on a format style? We can write our own, but clang-format has built in formats based on:
- LLVM: a style complying with the LLVM coding standards
- Google: a style complying with Google’s C++ style guide
- Chromium: a style complying with Chromium’s style guide
- Mozilla: A style complying with Mozilla’s style guide
- WebKit A style complying with WebKit’s style guide
It's easiest to just use one of these. I looked at Mozilla, and it looked fine to me. I could care less which one we pick. It is just one less thing we have to think about, and it makes the code predictable.
After one is picked, I'll write a pre-commit hook for git to run it when code is committed, or at least warn when clang-format hasn't been run.
Tasks:
- Pick a format
- Write pre-commit hook
- Add clang-format to dependency scripts and documentation
Reactions are currently unavailable