[DO NOT LAND] src: run clang-format on LINT_CPP_FILES#21998
Closed
joyeecheung wants to merge 3 commits intonodejs:masterfrom
Closed
[DO NOT LAND] src: run clang-format on LINT_CPP_FILES#21998joyeecheung wants to merge 3 commits intonodejs:masterfrom
joyeecheung wants to merge 3 commits intonodejs:masterfrom
Conversation
2 tasks
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.
a6b3e3a to
8bf9df6
Compare
3babcbc to
189cd50
Compare
devsnek
reviewed
Aug 1, 2018
| class AliasedBuffer { | ||
| public: | ||
| AliasedBuffer(v8::Isolate* isolate, const size_t count) | ||
| : isolate_(isolate), |
Member
There was a problem hiding this comment.
i feel like this was more readable before
Member
There was a problem hiding this comment.
This is ConstructorInitializerAllOnOneLineOrOnePerLine. There is apparently no option to force one per line.
| return *this = static_cast<NativeT>(val); | ||
| } | ||
|
|
||
| operator NativeT() const { |
Member
There was a problem hiding this comment.
can we have return always on a new line?
|
|
||
| template <typename TypeName> | ||
| size_t base64_decoded_size(const TypeName* src, size_t size) { | ||
| if (size == 0) |
| Boolean::New(env->isolate(), readable), | ||
| Boolean::New(env->isolate(), writable) | ||
| }; | ||
| Local<Value> argv[5] = {Integer::New(env->isolate(), status), |
Member
Author
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)
Member
Author
|
I think this PR has run its course. Closing... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
make -j4 test(UNIX), orvcbuild test(Windows) passes