We need to define a consistent coding style. And implement this in our existing code, as well as enforce it in the future. It should not be too complicated.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
I don't use a fully automatic solution myself, but you can setup git hooks which automatically run clang-format on every commit. For details, see e.g. https://github.com/andrewseidl/githook-clang-format
Note that this guy explicitly says that you should not use his git hooks :) Rather, people should install plugins in their editors that apply clang-format. His page contains links to plugins for popular editors.
Example: I am using clang-format for histogram
https://github.com/HDembinski/histogram
The repository contains a .clang-format file with a custom style. My editor, SublimeText, has a plugin called "Clang Format" which can be set up to use this .clang-format file and apply it on every save of the source code.
I see. The clang plugin seems to work also for emacs and many other editors. We will just enforce people to switch this on. Now we only have to agree on a specific format. For a start, I will copy the file you use in our repository.
We still will need a small script to format the existing code once... but this should not be difficult.
There is now a ./do-clang-format.sh and a .clang-format in the repository. Please use it, and we can further improve/change it. The code is already formatted accordingly.
This does not yet close this issue, since we need to write some documentation about it...