Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add guideline for naming convention. #131

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading