dev:codingconventions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dev:codingconventions [2015/01/30 09:31] – [Don't use poorly designed language features] oschuett | dev:codingconventions [2016/04/01 15:20] – add link to prettify page pseewald | ||
---|---|---|---|
Line 19: | Line 19: | ||
===== Don't use poorly designed language features ===== | ===== Don't use poorly designed language features ===== | ||
* Do not use the '' | * Do not use the '' | ||
- | * Do not use left-hand-side (lhs) reallocations of allocatables [-Wrealloc-lhs-all]. | + | * Do not use left-hand-side (lhs) reallocations of allocatables [-Wrealloc-lhs-all]. |
- | * Do not use '' | + | * Do not use '' |
* Do not use '' | * Do not use '' | ||
+ | * Do not query the '' | ||
+ | * Do not use '' | ||
===== Fight spaghetti code ===== | ===== Fight spaghetti code ===== | ||
Line 39: | Line 41: | ||
* Use the routines from '' | * Use the routines from '' | ||
* Use the routines from '' | * Use the routines from '' | ||
+ | * Don't use '' | ||
+ | * Use [[error_handling|CP2K' | ||
===== Remove dead code ===== | ===== Remove dead code ===== | ||
- | Every line of code has to be compiled and maintained. Hence, unused variables and code poses an unnecessary burden and should be removed. | + | * Every line of code has to be compiled and maintained. Hence, unused variables and code poses an unnecessary burden and should be removed |
+ | * Sometimes | ||
===== Format and document code ===== | ===== Format and document code ===== | ||
Line 48: | Line 53: | ||
* Each module and routine should be annotated with [[dev: | * Each module and routine should be annotated with [[dev: | ||
* Each preprocessor flag should start with two underscores and be documented in the '' | * Each preprocessor flag should start with two underscores and be documented in the '' | ||
- | * The code should be formatted with the prettify-tool by running '' | + | * The code should be formatted with the [[dev: |
===== Write tests ===== | ===== Write tests ===== | ||
* Every feature should be tested, with the goal of complete [[ http:// | * Every feature should be tested, with the goal of complete [[ http:// | ||
Line 58: | Line 62: | ||
* The following keywords are required: '' | * The following keywords are required: '' | ||
* The following keywords are optional: '' | * The following keywords are optional: '' | ||
- | * Please run '' | + | * Please run '' |
* See our [[ http:// | * See our [[ http:// | ||
- |
dev/codingconventions.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1