| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
I'm ambivalent of this change...
IMHO it has pros:
Cons:
Sorry, something went wrong.
|
@gengjiawen I like the idea of using clang-tidy. I'm not 100% sure about this specific implementation... Lite-CI: https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/2569/ |
Sorry, something went wrong.
|
@refack Maybe start an issue to start talk about clang-tidy. I am using Clion (bundled with clang-tidy) to review nodejs cpp code :) |
Sorry, something went wrong.
I use MSVS2017/9 which also has builtin clang-tidy integration (e.g. #23793). I also use Resharper (also by JetBrains) and sometimes I use CLion. I agree that proper use of better tools should allow us to improve our codebase. We have had a bit of discussion around clang-tidy - https://github.com/nodejs/node/search?q=clang-tidy&type=Issues I'd be happy to hear other contributors' opinions. |
Sorry, something went wrong.
|
I found MSVS2017 is pretty lame in handling cpp tbh. |
Sorry, something went wrong.
|
@addaleax Any thought on this clang-tidy rule ? |
Sorry, something went wrong.
|
@gengjiawen I don’t know … if the compiler can optimize this away (and it should), then yeah, I don’t know and I don’t think I have much to add to what the others here have said. I do like the changes to node_url.h and the cctest, and I’d definitely want to keep them. |
Sorry, something went wrong.
|
Should we start an issue to discuss https://clang.llvm.org/extra/clang-tidy/checks/performance-unnecessary-value-param.html with node cpp team (I am not sure it exists) ? Or just keep the change node_url.h and cctest, and revert others ? |
Sorry, something went wrong.
I think this PR is that issue :) I have no strong feelings either way. |
Sorry, something went wrong.
|
I'm +1 on the const std::string& changes (since std::string is mutable the const is a nice bonus). I'm -0 on the changes that add std::moveing of smart pointers in constructors. I'm -1 on changes that put const std::shared_ptr<T>& arg_ in the signature of APIs that actually do take a copy of the pointer. |
Sorry, something went wrong.
|
@refack I will try to do revert the const std::shared_ptr<T>& arg_ part tomorrow. |
Sorry, something went wrong.
Sorry, something went wrong.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/20799/ (:heavy_check_mark:) |
Sorry, something went wrong.
|
@danbev Can you import this change ? Thanks. |
Sorry, something went wrong.
PR-URL: #26042 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Thanks. |
Sorry, something went wrong.
PR-URL: #26042 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #26042 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Fix clang-tidy issue https://clang.llvm.org/extra/clang-tidy/checks/performance-unnecessary-value-param.html.
Checklist