User Tools

Site Tools


coding-conventions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
coding-conventions [2011/03/17 13:43]
mikael.ohman
coding-conventions [2017/11/24 16:45] (current)
bp Add4d Documentation & Testing, updated Checks before commiting
Line 1: Line 1:
 +=====Coding standard=====
 ==== Naming conventions ==== ==== Naming conventions ====
  
Line 135: Line 136:
 uncrustify -c oofem_dir/​uncrustify.cfg --replace mysource.C uncrustify -c oofem_dir/​uncrustify.cfg --replace mysource.C
 </​code>​ </​code>​
-==== Checks before committing ====+===== Documentation and Testing ===== 
 +OOFEM aims to be high quality software and as a such it must be accompanied by high quality, up to date documentation. Also internal tests and benchmarks are absolutely necessary to ensure continuous software quality ​ . 
 +  * The new functionality (elements, material models, etc.) will be only accepted if relevant documentation will be provided, in particular the oofem manuals should describe the new functionality 
 +  * The new functionality will be only accepted if internal tests will be developed and documented. See existing tests in oofem distribution (tests directory), and [[http://​www.oofem.org/​resources/​doc/​extractorInput/​html/​extractorInput.html|Extractor Specification]] 
 + 
 +===== Checks before committing ​=====
   * For new work, commit only when some stage of implementation is reached and code is already useful. Do not use svn repository as daily backup tool for your files, that you are developing for several weeks.   * For new work, commit only when some stage of implementation is reached and code is already useful. Do not use svn repository as daily backup tool for your files, that you are developing for several weeks.
   * Test your implementation before committing. Run at least oofem basic tests and check the results: <​code>​   * Test your implementation before committing. Run at least oofem basic tests and check the results: <​code>​
Line 142: Line 148:
 </​code>​ </​code>​
   * Check if documentation is updated as well (includes not only doc++ comments, but also oofem documentation,​ that can be affected). Making it later usually means never.   * Check if documentation is updated as well (includes not only doc++ comments, but also oofem documentation,​ that can be affected). Making it later usually means never.
 +  * Make sure that new functionality comes with internal tests.
   * Please compile your sources with "​-Wall",​ which will enable all the compiler warnings. Check compiler messages and clean up the code.  ​   * Please compile your sources with "​-Wall",​ which will enable all the compiler warnings. Check compiler messages and clean up the code.  ​
   * Reformat your code using uncrustify tool   * Reformat your code using uncrustify tool
coding-conventions.txt · Last modified: 2017/11/24 16:45 by bp