Skip to content

Commit

Permalink
doc: correct naming convention in C++ style guide
Browse files Browse the repository at this point in the history
The code and documentation uses PascalCase for C++ functions, methods,
and classes but the C++ style guide incorrectly says to use camelCase.

PR-URL: #52424
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
VoltrexKeyva authored Apr 10, 2024
1 parent 0d1e64f commit 7b01bfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/contributing/cpp-style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Node.js codebase not related to stylistic issues.
* [4 spaces of indentation for statement continuations](#4-spaces-of-indentation-for-statement-continuations)
* [Align function arguments vertically](#align-function-arguments-vertically)
* [Initialization lists](#initialization-lists)
* [CamelCase for methods, functions, and classes](#camelcase-for-methods-functions-and-classes)
* [PascalCase for methods, functions, and classes](#pascalcase-for-methods-functions-and-classes)
* [`snake_case` for local variables and parameters](#snake_case-for-local-variables-and-parameters)
* [`snake_case_` for private class fields](#snake_case_-for-private-class-fields)
* [`snake_case` for C-like structs](#snake_case-for-c-like-structs)
Expand Down Expand Up @@ -139,7 +139,7 @@ HandleWrap::HandleWrap(Environment* env,
handle_(handle) {
```
### CamelCase for methods, functions, and classes
### PascalCase for methods, functions, and classes
Exceptions are simple getters/setters, which are named `property_name()` and
`set_property_name()`, respectively.
Expand Down

0 comments on commit 7b01bfb

Please sign in to comment.