REGoth
REGoth copied to clipboard
Add coding-convention page to the wiki
I suggest utilizing clang-format (there already is a config I have committed a while ago but perhaps the rules have to be modified to match the standard), this is a tool that parses the code and automatically formats it according to the rules in configuration, e.g.
clang-format -i filename.cpp
would format filename.cpp. Maybe we could add that to CI so it would be invoked after each commit automatically. There is also a vim plugin (for those who use vim) for integration with clang format which would format the file after each save if configured that way. This would relieve everybody from following predefined rules and manually adjusting code to match the standard (while rules could still be listed for reference). We could run the utility first for the whole project once and then after each commit for the files that have been modified in that commit.
This might also be interesting: https://isocpp.github.io/CppCoreGuidelines
@CppAndre I like this part:
NL.1: Don’t say in comments what can be clearly stated in code Enforcement Build an AI program that interprets colloquial English text and see if what is said could be better expressed in C++.