Skip to content

Commit

Permalink
Add guideline for naming convention.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhebbeker committed Sep 21, 2024
1 parent cf7e909 commit 94c4bf0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,22 @@ A style configuration file is given: [`.clang-format`](.clang-format)

Although the standalone tool `clang-format` may be used, we recommend to integrate the formatting using a [plugin](https://firefox-source-docs.mozilla.org/code-quality/coding-style/format_cpp_code_with_clang-format.html#editor-plugins) for the editor of your choice.

#### Naming convention

For naming symbols in C or C++ we use the following rules to increase uniformity in our code:

- Types: `UpperCamelCase`
- Variables: `lowerCamelCase`
- C preprocessor macros: `MACRO_CASE`
- namespaces: `snail_case`
- Template parameters: `MACRO_CASE`
- Enumerators: `MACRO_CASE`
- Prefix interface classes with a capital `I`
- Do not use Hungarian notation.
- If your file defines mainly one class, consider to name the file after the class.

This shall be a nonbinding guideline and *does not need* to be enforced neither technically nor in manual code reviews.

### Doxygen configuration

If you change [`Doxyfile`](Doxyfile), please do a ['cleanup'](https://stackoverflow.com/questions/71157463/what-part-of-the-doxygen-configuration-doxyfile-is-recommended-for-version-con#comment125783393_71157463) by using the output of `doxygen -x`.
Expand Down

0 comments on commit 94c4bf0

Please sign in to comment.