-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node-api: format Node-API related code #42396
Conversation
Review requested:
|
bool escape_called() const { | ||
return escape_called_; | ||
} | ||
bool escape_called() const { return escape_called_; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a great opportunity to also align the Node-API code with our C++ style guide – it varies in quite a few aspects, esp. around name casing/underscore placement/etc.. It’s usually not important enough to make a fuss about, but since this PR is already about style changes anyway … 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! Let me do it in a follow up PR. I would like to keep this PR focusing only on the automated formatting without any other code changes.
One of my biggest concerns with this PR is how important the order of includes.
It seems that all tests are passing, and I assume that all should be fine.
Thank you for the sign off!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR-URL: #42396 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Landed in 718be08 |
Thank you @mhdawson for landing it! |
PR-URL: #42396 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: nodejs#42396 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: #42396 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: nodejs#42396 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: #42396 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: #42396 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: #42396 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: #42396 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: nodejs/node#42396 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
Format Node-API related source files using Clang Format.
There are no code changes besides the code formatting.
When we work on changes to Node-API it is very difficult to write code that satisfies the
lint-cpp
requirements because most of code is not formatted correctly. So, we often need to write new code, format file, copy new code, undo formatting, and then paste the new code. Instead, we must simplify the development process by allowing the code formatting that uses Clang Format and the.clang-format
specification in the root of the Node.JS project. This PR updates formatting of Node-API related files so that in future developers could simply format the whole file after implementing a change.Ideally, the
lint-cpp
must verify that all changed files are formatted correctly per.clang-format
specification.