I added support for clang-format and ran it on the whole source tree.
Uncrustify that we have been using so far is slowly dying, its output is unstable from version to version and it has less capabilities than clang-format.
I tried not to change too much the code, but due to our inconsistent formatting, some changes were needed anyway.
Reasons for doing this:
Propper formatting of code, including macros and protobuf files
Stable output
C++11 compatibility
Easier to configure
Reasons for not doing this:
Git blame will be broken for a while. This can be mitigated by looking at a file history directly.
Pull requests currently in-flight will probably be broken (sorry)
Note that this was tested on an install of Clang 7, make sure you have a recent enough version!
I added support for clang-format and ran it on the whole source tree. Uncrustify that we have been using so far is slowly dying, its output is unstable from version to version and it has less capabilities than clang-format. I tried not to change too much the code, but due to our inconsistent formatting, some changes were needed anyway.
Reasons for doing this:
Reasons for not doing this:
Note that this was tested on an install of Clang 7, make sure you have a recent enough version!