Bläddra i källkod

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
Jakob Hasse 2 år sedan
förälder
incheckning
a3782377d7
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      docs/en/contribute/style-guide.rst

+ 1 - 1
docs/en/contribute/style-guide.rst

@@ -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.