From 7fbe29db8a338042eac21f4a04d5e3ec7fd310a2 Mon Sep 17 00:00:00 2001 From: Yuya Inoue <65857152+inoway46@users.noreply.github.com> Date: Thu, 5 Nov 2026 03:42:51 +0900 Subject: [PATCH] doc: document C++ formatting in the pull request guide Document formatter setup and usage separately from make lint so contributors can catch C/C++ formatting issues before CI runs. Refs: https://github.com/nodejs/node/pull/66834#issuecomment-6583209249 Assisted-by: Codex Signed-off-by: inoway46 PR-URL: https://github.com/nodejs/node/pull/67205 Reviewed-By: Luigi Pinca Reviewed-By: Darshan Sen --- doc/contributing/pull-requests.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/contributing/pull-requests.md b/doc/contributing/pull-requests.md index 77b9148213b..2e03ad2a3c2 100644 --- a/doc/contributing/pull-requests.md +++ b/doc/contributing/pull-requests.md @@ -121,6 +121,16 @@ If you are modifying code, please be sure to run `make lint` (or `vcbuild.bat lint` on Windows) to ensure that the changes follow the Node.js code style guide. +For C/C++ changes, also run the formatter, which is not included in `make lint`. +Install the formatter tooling with `make format-cpp-build`, then format the +changes in your branch: + +```bash +CLANG_FORMAT_START=$(git merge-base HEAD main) make format-cpp +``` + +Review and commit any formatting changes before submitting the pull request. + Any documentation you write (including code comments and API documentation) should follow the [Style Guide](../../doc/README.md). Code samples included in the API docs will also be checked when running `make lint` (or