| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@joyeecheung build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/364/pipeline |
Sorry, something went wrong.
This patch adds a `make format-cpp` shortcut to the Makefile that runs clang-format on the C++ diffs, and a `make format-cpp-build` to install clang-format from npm. To format staged changes: ``` $ make format-cpp ``` To format HEAD~1...HEAD (latest commit): ``` $ CLANG_FORMAT_START=`git rev-parse HEAD~1` make format-cpp ``` To format diff between master and current branch head (master...HEAD): ``` $ CLANG_FORMAT_START=master make format-cpp ``` Most of the .clang-format file comes from running ``` $ clang-format --dump-config --style=Google ``` with clang-format built with llvm/trunk 328768 (npm version 1.2.3) The clang-format version is fixed because different version of clang-format may format the files differently.
| class AliasedBuffer { | ||
| public: | ||
| AliasedBuffer(v8::Isolate* isolate, const size_t count) | ||
| : isolate_(isolate), |
There was a problem hiding this comment.
i feel like this was more readable before
Sorry, something went wrong.
There was a problem hiding this comment.
This is ConstructorInitializerAllOnOneLineOrOnePerLine. There is apparently no option to force one per line.
Sorry, something went wrong.
| return *this = static_cast<NativeT>(val); | ||
| } | ||
|
|
||
| operator NativeT() const { |
There was a problem hiding this comment.
can we have return always on a new line?
Sorry, something went wrong.
|
|
||
| template <typename TypeName> | ||
| size_t base64_decoded_size(const TypeName* src, size_t size) { | ||
| if (size == 0) |
There was a problem hiding this comment.
return on new line
Sorry, something went wrong.
| Boolean::New(env->isolate(), readable), | ||
| Boolean::New(env->isolate(), writable) | ||
| }; | ||
| Local<Value> argv[5] = {Integer::New(env->isolate(), status), |
There was a problem hiding this comment.
ouch
Sorry, something went wrong.
There was a problem hiding this comment.
@devsnek Yeah I thought it looked strange but then this came from Google's style and in the documentation they argued this is more suited for C++11 (This is named Cpp11BracedListStyle)
Sorry, something went wrong.
|
I think this PR has run its course. Closing... |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is how the clang-format file in #21997 styles the $LINT_CPP_FILES. It's just a preview, so please ignore it if you are not curious about how the styles enforced in #21997 look like.
Produced with
Checklist