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 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67205
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
Yuya Inoue authored and GitHub committed 2026-11-04 18:42:51 +00:00
1 parent 20daf9a4c7
commit 7fbe29db8a
1 file changed
+10
+10
View File
@@ -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