Clang formatΒΆ
In order to have one unified code formatting style, we use clang-format.
Clang-format automatically formats source code according to a set of rules which a project needs to agree on.
Our current style can be found in the clang-format file file in the root folder of the repository.
We recommend to install plugins which auto format the code when the file is being saved.
Instructions for how to enable clang-format in Microsoft Visual Studio can be found here.
Other editors like Visual Studio Code, Atom.io, Notepad++ and Sublime Text support this as well.
Part of our Continuous Integration (CI) are automated clang-format checks using GitHub actions.
Our setup of clang-format with GitHub actions can be here.
A pull request will only be accepted if it follows those code formatting rules.
Example of clang-format checking a pull request along with gcc/clang/msvc build:
