Document C++ code style and naming conventions #4685
Labels
area:contributing
Issues and PRs related to the Contributing/Development section of the documentation
enhancement
Your Godot version:
Any.
Issue description:
There's little information regarding existing code style used throughout Godot's C++ codebase in the docs, unlike GDScript and C#. This is important to document to ensure Godot follows consistent code style, and especially important for new contributors.
See godotengine/godot#33027 for consensus regarding C++ code style in Godot. To summarize:
Formatting
clang-format
).clang-tidy
).clang-format
).Code style
snake_case
for identifiers (variables).PascalCase
for classes.SHOUTING_SNAKE_CASE
for constants.p_
for method parameters, andr_
for parameters which are intended to "return" something (modified by the method).URL to the documentation page (if already existing):
Can be added to the "Code style guidelines" page.
The text was updated successfully, but these errors were encountered: