Skip to content

Commit 6190552

Browse files
RaisinTenjuanarbol
authored andcommitted
build: fix format-cpp
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 <raisinten@gmail.com> PR-URL: #42764 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent f41ea76 commit 6190552

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/linters.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ jobs:
7070
- name: Format C/C++ files
7171
run: |
7272
make format-cpp-build
73+
# The `make format-cpp` error code is intentionally ignored here
74+
# because it is irrelevant. We already check if the formatter produced
75+
# a diff in the next line.
76+
# Refs: https://github.com/nodejs/node/pull/42764
7377
CLANG_FORMAT_START="$(git merge-base HEAD refs/remotes/origin/$GITHUB_BASE_REF)" \
74-
make format-cpp
78+
make format-cpp || true
7579
git --no-pager diff --exit-code && EXIT_CODE="$?" || EXIT_CODE="$?"
7680
if [ "$EXIT_CODE" != "0" ]
7781
then

0 commit comments

Comments
 (0)