diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 21:27:01 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 21:27:01 +0200 |
commit | 080ad535e6fc6666b919b1a21b6986aaf9b678eb (patch) | |
tree | f4d96cb68769ddd06087977ad7d26c3fd31ff4e8 /contributing.md | |
parent | de356f60b91fab37b1456992dc66ada8bd8e4dd7 (diff) |
initial nitpicking
Diffstat (limited to 'contributing.md')
-rw-r--r-- | contributing.md | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/contributing.md b/contributing.md index 379494d..59adefb 100644 --- a/contributing.md +++ b/contributing.md @@ -26,6 +26,11 @@ decisions - Formatting nitty-gritty is handled by clang-format/clang-tidy (run `make format` in the root folder of this repository to format all sources files) +- Header includes are split into paragraphs separated by a blank line. The + order is: + 1. system headers (using `<`brackets`>`) + 2. relative headers NOT in the same folder as the current file + 3. relative headers in the same folder as the current file - When using libraries of which the header include order is important, make sure to separate the include statements using a blank line (clang-format may sort include statements, but does not sort across empty lines). @@ -33,7 +38,7 @@ user-facing APIs under `crepe::api` (the folder structure should also reflect this). - `using namespace` may not be used in header files, only in source files. -- Do not (indirectly) include private dependency headers in API header files, +- Do not (indirectly) include private *dependency* headers in API header files, as these are no longer accessible when the engine is installed - Getter and setter functions are appropriately prefixed with `get_` and `set_`. @@ -60,6 +65,12 @@ declaration instead of using the constructor. - Header files declare either a single class or symbols within a single namespace. +- Only use member initializer lists for non-trivial types. +- C++-style structs should define default values for all non-trivial fields. +- Declare incomplete classes instead of including the relevant header where + possible (i.e. if you only need a reference or pointer type). +- Template functions are only declared in a `.h` header, and defined in a + matching `.hpp` header. ## CMakeLists specific @@ -68,11 +79,6 @@ resolving merge conflicts when multiple sources were added by different people to the same CMakeLists.txt easier. -## Doxygen style - -- [a C-style doxygen example](https://www.cs.cmu.edu/~410/doc/doxygen.html) - - # Documentation - All documentation is written in U.S. English |