Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
build: run clang-format on CI#42681
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
build: run clang-format on CI #42681
Uh oh!
There was an error while loading. Please reload this page.
Conversation
RaisinTen commented Apr 10, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Apr 10, 2022
Review requested:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
We already include the tool inside tools/clang-format, so we should start using it on CI. This attempts to run the linter only on the commits present in an opened PR. Signed-off-by: Darshan Sen <[email protected]>
Signed-off-by: Darshan Sen <[email protected]>
6c3f55c to acfed40CompareSigned-off-by: Darshan Sen <[email protected]>
Trott commented Apr 10, 2022
Not a blocking comment, but for reviewers who may not be aware:
Refs: #42665 (comment) |
targos commented Apr 10, 2022
Doesn't it only affect the changed lines? |
RaisinTen commented Apr 10, 2022
Yes, that's the intent. |
Trott commented Apr 10, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I was under the impression that it only affects changed files, but is it actually only the changed lines in those files? If so, I didn't realize it was that granular. That's very helpful in this situation. |
Trott commented Apr 10, 2022
I think the answer is "no" but just to make sure: Will we want to start checking in the |
RaisinTen commented Apr 11, 2022
Yes, that's right. It was one of the key points that made #21997 a better approach than #16122.
Did you get a chance to go through the demo I edited into the PR description?
Running Lines 1443 to 1444 in 0c57a37
|
Trott commented Apr 11, 2022
That works for me. |
Uh oh!
There was an error while loading. Please reload this page.
RaisinTen commented Apr 13, 2022
Needed another approval because I committed #42681 (comment) after the last review. |
We already include the tool inside tools/clang-format, so we should start using it on CI. This attempts to run the linter only on the commits present in an opened PR. Signed-off-by: Darshan Sen <[email protected]> PR-URL: nodejs#42681 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
tniessen commented Apr 17, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Is the failure in #42701 related to this change? The output is not particularly helpful: |
RaisinTen commented Apr 17, 2022
@tniessen You mean in #42701? Hmm, the error looks different from what I got in this PR (as you can see in the description, it is supposed to print the diff and also print the command you can run to fix it locally). 👀 |
tniessen commented Apr 17, 2022
Oops, yes, that's what I mean :) I did that, seems to pass now. |
According to the logs in nodejs#42681 (comment), `make format-cpp` exits with an NZEC. This change intentionally ignores the error code because it is irrelevant. We already check if the formatter produced a diff in the next line. Refs: nodejs#42681 (comment) Signed-off-by: Darshan Sen <[email protected]>
RaisinTen commented Apr 17, 2022
Since we run the formatter only on PRs that are targetting the master branch, let's specify that. Refs: nodejs#42681 (comment) Signed-off-by: Darshan Sen <[email protected]>
Since we run the formatter only on PRs that are targeting the master branch, let's specify that. Refs: nodejs#42681 (comment) Signed-off-by: Darshan Sen <[email protected]>
Since we run the formatter only on PRs that are targeting the master branch, let's specify that. Refs: nodejs#42681 (comment) Signed-off-by: Darshan Sen <[email protected]>
According to the logs in #42681 (comment), `make format-cpp` exits with an NZEC. This change intentionally ignores the error code because it is irrelevant. We already check if the formatter produced a diff in the next line. Refs: #42681 (comment) Signed-off-by: Darshan Sen <[email protected]> PR-URL: #42764 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
We already include the tool inside tools/clang-format, so we should start using it on CI. This attempts to run the linter only on the commits present in an opened PR. Signed-off-by: Darshan Sen <[email protected]> PR-URL: nodejs#42681 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
According to the logs in nodejs#42681 (comment), `make format-cpp` exits with an NZEC. This change intentionally ignores the error code because it is irrelevant. We already check if the formatter produced a diff in the next line. Refs: nodejs#42681 (comment) Signed-off-by: Darshan Sen <[email protected]> PR-URL: nodejs#42764 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
According to the logs in #42681 (comment), `make format-cpp` exits with an NZEC. This change intentionally ignores the error code because it is irrelevant. We already check if the formatter produced a diff in the next line. Refs: #42681 (comment) Signed-off-by: Darshan Sen <[email protected]> PR-URL: #42764 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
We already include the tool inside tools/clang-format, so we should start using it on CI. This attempts to run the linter only on the commits present in an opened PR. Signed-off-by: Darshan Sen <[email protected]> PR-URL: #42681 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
According to the logs in #42681 (comment), `make format-cpp` exits with an NZEC. This change intentionally ignores the error code because it is irrelevant. We already check if the formatter produced a diff in the next line. Refs: #42681 (comment) Signed-off-by: Darshan Sen <[email protected]> PR-URL: #42764 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
We already include the tool inside tools/clang-format, so we should start using it on CI. This attempts to run the linter only on the commits present in an opened PR. Signed-off-by: Darshan Sen <[email protected]> PR-URL: #42681 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
According to the logs in #42681 (comment), `make format-cpp` exits with an NZEC. This change intentionally ignores the error code because it is irrelevant. We already check if the formatter produced a diff in the next line. Refs: #42681 (comment) Signed-off-by: Darshan Sen <[email protected]> PR-URL: #42764 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
We already include the tool inside tools/clang-format, so we should start using it on CI. This attempts to run the linter only on the commits present in an opened PR. Signed-off-by: Darshan Sen <[email protected]> PR-URL: #42681 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
According to the logs in #42681 (comment), `make format-cpp` exits with an NZEC. This change intentionally ignores the error code because it is irrelevant. We already check if the formatter produced a diff in the next line. Refs: #42681 (comment) Signed-off-by: Darshan Sen <[email protected]> PR-URL: #42764 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
We already include the tool inside tools/clang-format, so we should start using it on CI. This attempts to run the linter only on the commits present in an opened PR. Signed-off-by: Darshan Sen <[email protected]> PR-URL: #42681 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
According to the logs in #42681 (comment), `make format-cpp` exits with an NZEC. This change intentionally ignores the error code because it is irrelevant. We already check if the formatter produced a diff in the next line. Refs: #42681 (comment) Signed-off-by: Darshan Sen <[email protected]> PR-URL: #42764 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
We already include the tool inside tools/clang-format, so we should start using it on CI. This attempts to run the linter only on the commits present in an opened PR. Signed-off-by: Darshan Sen <[email protected]> PR-URL: nodejs/node#42681 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
According to the logs in nodejs/node#42681 (comment), `make format-cpp` exits with an NZEC. This change intentionally ignores the error code because it is irrelevant. We already check if the formatter produced a diff in the next line. Refs: nodejs/node#42681 (comment) Signed-off-by: Darshan Sen <[email protected]> PR-URL: nodejs/node#42764 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
We already include the tool inside
tools/clang-format, so we shouldstart using it on CI. This attempts to run the linter only on the
commits present in an opened PR.
Demo
The diff in acfed40:
triggers the clang-format linter and it fails the CI run with this error: https://github.com/nodejs/node/runs/5960445927?check_suite_focus=true
. Accepting the suggested change in abfa103 produces a green CI - https://github.com/nodejs/node/runs/5960458481?check_suite_focus=true.
Signed-off-by: Darshan Sen [email protected]