From 1e022990f32978176cdd2661f43beb27db5b1577 Mon Sep 17 00:00:00 2001 From: Mohammed Keyvanzadeh Date: Wed, 10 Apr 2024 19:02:53 +0330 Subject: [PATCH] doc: correct naming convention in C++ style guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code and documentation uses PascalCase for C++ functions, methods, and classes but the C++ style guide incorrectly says to use camelCase. PR-URL: https://github.com/nodejs/node/pull/52424 Reviewed-By: Luigi Pinca Reviewed-By: Rafael Gonzaga Reviewed-By: Ulises Gascón Reviewed-By: Antoine du Hamel --- doc/contributing/cpp-style-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/contributing/cpp-style-guide.md b/doc/contributing/cpp-style-guide.md index ea2a66d34e89b7..f698bf21c7ccf1 100644 --- a/doc/contributing/cpp-style-guide.md +++ b/doc/contributing/cpp-style-guide.md @@ -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) @@ -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.