0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
Commit Graph

9 Commits

Author SHA1 Message Date
Joyee Cheung
27925c4086
doc: suggest not to throw JS errors from C++
Also provide an example on how to use internal/errors
to handle errors in C++.

PR-URL: https://github.com/nodejs/node/pull/18149
Refs: https://github.com/nodejs/node/issues/18106
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2018-01-17 02:42:52 +08:00
Matheus Marchini
a17f426412
doc: add C++ style comments to the style guide
Adds instructions on how to format C++ comments to the C++ style guide,
as `cpplint.py` doesn't complain about C-style comments on the code.

PR-URL: https://github.com/nodejs/node/pull/17617
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2017-12-15 19:39:52 -02:00
Rich Trott
9472d69d1d doc: add serial comma in CPP_STYLE_GUIDE.md
PR-URL: https://github.com/nodejs/node/pull/17464
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-12-05 19:50:10 -08:00
Franziska Hinkelmann
fff4272fa7 doc: introduce categories to Cpp style guide
Ref: https://github.com/nodejs/node/pull/17052#discussion_r151228700

PR-URL: https://github.com/nodejs/node/pull/17095
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-12-03 18:27:34 +01:00
Rich Trott
ff9a6bc1f3 doc: add missing serial commas
PR-URL: https://github.com/nodejs/node/pull/17384
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2017-12-01 14:46:36 -08:00
Franziska Hinkelmann
0e1abb12e2 doc: mention smart pointers in Cpp style guide
Add rule for smart pointers, i.e., std::unique_ptr and std::shared_ptr,
to the Cpp style guide. Mostly copied from the Google style guide.

PR-URL: https://github.com/nodejs/node/pull/17055
Ref: https://github.com/nodejs/node/pull/16970
Ref: https://github.com/nodejs/node/pull/16974
Ref: https://github.com/nodejs/node/pull/17000
Ref: https://github.com/nodejs/node/pull/17012
Ref: https://github.com/nodejs/node/pull/17020
Ref: https://github.com/nodejs/node/pull/17030
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-11-17 10:47:31 +01:00
Franziska Hinkelmann
ed0327b886 doc: add Table of Contents to Cpp style guide
The Cpp style guide is growing. IMHO, a Table of Contents makes
it easier to navigate.

PR-URL: https://github.com/nodejs/node/pull/17052
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2017-11-16 09:56:55 +01:00
Joyee Cheung
ab2c35100f doc: add *-inl.h include rule to C++ style guide
PR-URL: https://github.com/nodejs/node/pull/16548
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-30 18:57:06 +08:00
Anna Henningsen
23340b9234
doc: add basic C++ style guide
Ideally, most of these things would be enforced via linter rules.
This is a first step into having a style guide that goes beyond
what the linter currently enforces.

PR-URL: https://github.com/nodejs/node/pull/16090
Fixes: https://github.com/nodejs/node/issues/12636
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-10-14 11:13:29 +02:00