Open romangg opened 4 years ago
This is being executed on the server-objects branch as part of the server objects remodel prototype work #15.
The included clang-format check was adjusted to enforce the ref/pointer alignment. For the const position there is currently no clang-format check possible.
Server objects rework has been landed. We enforce the left reference/pointer alignment in there now with clang-format.
clang-format doesn't enforce const qualifier positioning though. Maybe something to look into in the future.
Let's leave this issue open for now to maybe define more refinements in the future.
Not all of the style can be enforced through clang-format. At some point we should formulate a style guide so it's clearly documented.
The project currently follows the KDE Frameworks Coding style as the CONTRIBUTING.md document prescribes. The style is not perfect and does not seem to be actively maintained. We might want to deviate from it, in particular because there is the opportunity to enforce a style with CI. Following a list of possible changes:
int* x
int const x
[[maybe_unused]]
[1] Vandevoorde: C++ Templates: The Complete Guide