Merge branch 'doc/cxx_style_guide_camel_case_collision' into 'master'

doc: made reasonable exception for CamelCase explicit

See merge request espressif/esp-idf!22912
This commit is contained in:
Jakob Hasse 2023-03-27 13:52:00 +08:00
commit a3782377d7

View File

@ -323,7 +323,7 @@ C++ Header files have the extension ``.hpp``. C++ source files have the extensio
Naming
^^^^^^
* **Class and struct** names shall be written in ``CamelCase`` with a capital letter as beginning. Member variables and methods shall be in ``snake_case``.
* **Class and struct** names shall be written in ``CamelCase`` with a capital letter as beginning. Member variables and methods shall be in ``snake_case``. An exception from ``CamelCase`` is if the readability is severely decreased, e.g. in ``GPIOOutput``, then an underscore ``_`` is allowed to make it more readable: ``GPIO_Output``.
* **Namespaces** shall be in lower ``snake_case``.
* **Templates** are specified in the line above the function declaration.
* Interfaces in terms of Object-Oriented Programming shall be named without the suffix ``...Interface``. Later, this makes it easier to extract interfaces from normal classes and vice versa without making a breaking change.