Skip to content

Coding style and rules

Vicente Adolfo Bolea Sanchez edited this page Nov 15, 2017 · 4 revisions

Indentation

  • No tabs, 2 spaces
  • namespaces are not indented
  • Google indentation style

Naming

  • Use underscore to separate words in functions, variables, member variables and namespaces.
  • First character of a class name should be capitalized and if it consist in a sentence do not use underscore.
  • namespaces should be not capitalized.
  • File names should be the same of the class, never capitalized.

Others

  • One class per file
  • Include comments using doxygen format
  • Using marker for folding is optional but most of the classes in the project uses it.

Recommended VIM's settings for this coding style:

"Indentation
set shiftwidth=2
set expandtab
set tabstop=2
set backspace=2
set foldmethod=marker
set cino=N-s
match Error /{{{\|}}}/