IAP GITLAB

Skip to content
Snippets Groups Projects
Commit ebefb05c authored by ralfulrich's avatar ralfulrich Committed by Ralf Ulrich
Browse files

update of coding style

parent 1ea2d6c2
No related branches found
No related tags found
No related merge requests found
...@@ -51,8 +51,9 @@ While `clang-format` does the structural formatting, we still need to agree on n ...@@ -51,8 +51,9 @@ While `clang-format` does the structural formatting, we still need to agree on n
- Any static variable has a "g" prefix. A static member variable starts with "fg" - Any static variable has a "g" prefix. A static member variable starts with "fg"
- Class member functions start with capital letters - Class member functions start with capital letters
- Any class getter begins with "Get", and setter with "Set". Logical getters start with "Is" or "Has". - Any class getter begins with "Get", and setter with "Set". Logical getters start with "Is" or "Has".
- enums should be "enum class" and start with a capital "E" - enums should be "enum class"
- Function parameter names start with "v" - Function parameter names start with "v"
- Normal variable names in code start non-capital, and they cannot start with a "prefixed" v, f, fg, or g character
- We use namespaces to avoid clashes and to structure code - We use namespaces to avoid clashes and to structure code
- *Everything* is part of the corsika namespace - *Everything* is part of the corsika namespace
...@@ -92,8 +93,10 @@ While `clang-format` does the structural formatting, we still need to agree on n ...@@ -92,8 +93,10 @@ While `clang-format` does the structural formatting, we still need to agree on n
exposed to outside users, there might be pointers for very special cases exposed to outside users, there might be pointers for very special cases
inside of classes. inside of classes.
- When you contribute new code, or extend existing code, at the same time provide unit-tests for all functionality. - When you contribute new code, or extend existing code, at the same time provide unit-tests for all functionality.
- When you contribute new physics algorithms, in addition you also need to provide a validation module - When you contribute new physics algorithms, in addition you also need to provide a validation module (this is still TBD what exactly this means)
- Code must be documented with `doxygen` commands - Code must be documented with `doxygen` commands extensively -> MAKE THIS INVESTMENT OF YOUR TIME EARLY, IT REALLY HELPS
- There should not be any useless comments in code, in particular absolutely avoid to commit commented-out debug remnants
- Add (extensively) meaningful comments to the code (only in English)
## CMAKE formatting ## CMAKE formatting
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment