REGoth icon indicating copy to clipboard operation
REGoth copied to clipboard

Add coding-convention page to the wiki

Open ataulien opened this issue 8 years ago • 3 comments

ataulien avatar Jan 16 '17 11:01 ataulien

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.

CommanderJax avatar Jan 16 '17 12:01 CommanderJax

This might also be interesting: https://isocpp.github.io/CppCoreGuidelines

AMS21 avatar Jul 04 '17 14:07 AMS21

@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++.

frabert avatar Jul 04 '17 14:07 frabert