-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
tools: add clang-tidy rule in src #26840
Conversation
What I was referring to is V8's rule set. CI for this: https://ci.nodejs.org/job/node-clang-tidy/5/console |
d905b48
to
4457b76
Compare
What's the status here? |
Need to change some rules in my side. Not know the progress in CI setup ? @refack |
Let's see https://ci.nodejs.org/job/node-clang-tidy/6/ BTW: Apparently there a more comprehensive wrapper around LLVM's LibTooling - |
4457b76
to
13c6e0b
Compare
I update the rules to disable Also not quite sure |
It's in the queue and will soon show up as https://ci.nodejs.org/job/node-clang-tidy/7/ |
Rebased over #27264 Filtered results https://gist.github.com/refack/8490362a2dd0dabb444a9e9f3ea1bd98 |
13c6e0b
to
3dad453
Compare
3dad453
to
b38e5c3
Compare
I rebased and some fix for the left. Can you trigger this task again ? |
18393d9
to
cebebf0
Compare
Revert
|
cebebf0
to
49703c6
Compare
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.
Nice, LGTM!
@refack Need to retrigger the Jenkins task. |
@refack ping |
@gengjiawen is there something you have to wait upon to land this besides rebasing? |
This can land. But @refack works on a Jenkins job can make sure the rules checks on CI. |
I ran the job with default parameters and it failed: https://ci.nodejs.org/job/node-clang-tidy/12/console |
Sure. But I am not familiar with related cpp tools. I am thinking landing this change first, thoughts ? |
I don't use clang nor clang-tidy so I have no opinion on the rules. |
Force push to resolve conflict. |
49703c6
to
87828b1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Landed in a42dcbe |
PR-URL: #26840 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #26840 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #26840 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #26840 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rich Trott <rtrott@gmail.com>
In short
Todo
Tools to ensure the rules
@refack told me some rules are checked.
Basically the rules should check most operating systems because we have platform-specific code such as using macro.
And should keep clang-tidy in same version when possible.
I have some thought on docker get involved in this. Hopefully I can put my thought
in
node\build
group this weekends.Google Cpp Guideline
Related to #24315.
clang-tidy can handle some google cpp guideline rules.
I don't know should we
google-
or just some of them.see https://clang.llvm.org/extra/clang-tidy/
Rules need to be select.
The rules now included are already applied or in-review.
How to deal with false positive and make exceptions
.
cc @addaleax @bnoordhuis @refack @joyeecheung @jasnell @richardlau @danbev @Trott @BridgeAR
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes